home *** CD-ROM | disk | FTP | other *** search
open in:
MacOS 8.1
|
Win98
|
DOS
browse contents |
view JSON data
|
view as text
This file was processed as: LaTeX Document
(document/latex).
Confidence | Program | Detection | Match Type | Support
|
---|
100%
| dexvert
| LaTeX Document (document/latex)
| magic
| Supported |
1%
| dexvert
| Text File (text/txt)
| fallback
| Supported |
100%
| file
| LaTeX document text
| default
| |
99%
| file
| LaTeX document, ASCII text
| default
| |
100%
| perlTextCheck
| Likely Text (Perl)
| default
| |
100%
| siegfried
| fmt/281 LaTeX (Subdocument)
| default
| |
100%
| detectItEasy
| Format: plain text[LF]
| default (weak)
|
|
hex view+--------+-------------------------+-------------------------+--------+--------+
|00000000| 5c 63 68 61 70 74 65 72 | 7b 43 6f 6d 70 69 6c 65 |\chapter|{Compile|
|00000010| 72 20 4f 76 65 72 76 69 | 65 77 7d 20 25 20 2d 2a |r Overvi|ew} % -*|
|00000020| 2d 20 44 69 63 74 69 6f | 6e 61 72 79 3a 20 64 65 |- Dictio|nary: de|
|00000030| 73 69 67 6e 20 2d 2a 2d | 0a 0a 54 68 65 20 73 74 |sign -*-|..The st|
|00000040| 72 75 63 74 75 72 65 20 | 6f 66 20 74 68 65 20 63 |ructure |of the c|
|00000050| 6f 6d 70 69 6c 65 72 20 | 6d 61 79 20 62 65 20 62 |ompiler |may be b|
|00000060| 72 6f 61 64 6c 79 20 63 | 68 61 72 61 63 74 65 72 |roadly c|haracter|
|00000070| 69 7a 65 64 20 62 79 20 | 64 65 73 63 72 69 62 69 |ized by |describi|
|00000080| 6e 67 20 74 68 65 0a 63 | 6f 6d 70 69 6c 61 74 69 |ng the.c|ompilati|
|00000090| 6f 6e 20 70 68 61 73 65 | 73 20 61 6e 64 20 74 68 |on phase|s and th|
|000000a0| 65 20 64 61 74 61 20 73 | 74 72 75 63 74 75 72 65 |e data s|tructure|
|000000b0| 73 20 74 68 61 74 20 74 | 68 65 79 20 6d 61 6e 69 |s that t|hey mani|
|000000c0| 70 75 6c 61 74 65 2e 20 | 20 54 68 65 20 73 74 65 |pulate. | The ste|
|000000d0| 70 73 20 69 6e 0a 74 68 | 65 20 63 6f 6d 70 69 6c |ps in.th|e compil|
|000000e0| 61 74 69 6f 6e 20 61 72 | 65 20 63 61 6c 6c 65 64 |ation ar|e called|
|000000f0| 20 70 68 61 73 65 73 20 | 72 61 74 68 65 72 20 74 | phases |rather t|
|00000100| 68 61 6e 20 70 61 73 73 | 65 73 20 73 69 6e 63 65 |han pass|es since|
|00000110| 20 74 68 65 79 20 64 6f | 6e 27 74 0a 6e 65 63 65 | they do|n't.nece|
|00000120| 73 73 61 72 69 6c 79 20 | 69 6e 76 6f 6c 76 65 20 |ssarily |involve |
|00000130| 61 20 66 75 6c 6c 20 70 | 61 73 73 20 6f 76 65 72 |a full p|ass over|
|00000140| 20 74 68 65 20 63 6f 64 | 65 2e 20 20 54 68 65 20 | the cod|e. The |
|00000150| 64 61 74 61 20 73 74 72 | 75 63 74 75 72 65 20 75 |data str|ucture u|
|00000160| 73 65 64 20 74 6f 0a 72 | 65 70 72 65 73 65 6e 74 |sed to.r|epresent|
|00000170| 20 74 68 65 20 63 6f 64 | 65 20 61 74 20 73 6f 6d | the cod|e at som|
|00000180| 65 20 70 6f 69 6e 74 20 | 69 73 20 63 61 6c 6c 65 |e point |is calle|
|00000190| 64 20 61 6e 20 7b 5c 69 | 74 20 69 6e 74 65 72 6d |d an {\i|t interm|
|000001a0| 65 64 69 61 74 65 0a 72 | 65 70 72 65 73 65 6e 74 |ediate.r|epresent|
|000001b0| 61 74 69 6f 6e 2e 7d 0a | 0a 54 77 6f 20 6d 61 6a |ation.}.|.Two maj|
|000001c0| 6f 72 20 69 6e 74 65 72 | 6d 65 64 69 61 74 65 20 |or inter|mediate |
|000001d0| 72 65 70 72 65 73 65 6e | 74 61 74 69 6f 6e 73 20 |represen|tations |
|000001e0| 61 72 65 20 75 73 65 64 | 20 69 6e 20 74 68 65 20 |are used| in the |
|000001f0| 63 6f 6d 70 69 6c 65 72 | 3a 0a 5c 62 65 67 69 6e |compiler|:.\begin|
|00000200| 7b 69 74 65 6d 69 7a 65 | 7d 0a 0a 5c 69 74 65 6d |{itemize|}..\item|
|00000210| 20 54 68 65 20 49 6d 70 | 6c 69 63 69 74 20 43 6f | The Imp|licit Co|
|00000220| 6e 74 69 6e 75 61 74 69 | 6f 6e 20 52 65 70 72 65 |ntinuati|on Repre|
|00000230| 73 65 6e 74 61 74 69 6f | 6e 20 28 49 43 52 29 20 |sentatio|n (ICR) |
|00000240| 72 65 70 72 65 73 65 6e | 74 73 20 74 68 65 20 6c |represen|ts the l|
|00000250| 69 73 70 2d 6c 65 76 65 | 6c 0a 73 65 6d 61 6e 74 |isp-leve|l.semant|
|00000260| 69 63 73 20 6f 66 20 74 | 68 65 20 73 6f 75 72 63 |ics of t|he sourc|
|00000270| 65 20 63 6f 64 65 20 64 | 75 72 69 6e 67 20 74 68 |e code d|uring th|
|00000280| 65 20 69 6e 69 74 69 61 | 6c 20 70 68 61 73 65 73 |e initia|l phases|
|00000290| 2e 20 20 50 61 72 74 69 | 61 6c 20 65 76 61 6c 75 |. Parti|al evalu|
|000002a0| 61 74 69 6f 6e 20 61 6e | 64 0a 73 65 6d 61 6e 74 |ation an|d.semant|
|000002b0| 69 63 20 61 6e 61 6c 79 | 73 69 73 20 61 72 65 20 |ic analy|sis are |
|000002c0| 64 6f 6e 65 20 6f 6e 20 | 74 68 69 73 20 72 65 70 |done on |this rep|
|000002d0| 72 65 73 65 6e 74 61 74 | 69 6f 6e 2e 20 20 49 43 |resentat|ion. IC|
|000002e0| 52 20 69 73 20 72 6f 75 | 67 68 6c 79 20 65 71 75 |R is rou|ghly equ|
|000002f0| 69 76 61 6c 65 6e 74 0a | 74 6f 20 61 20 73 75 62 |ivalent.|to a sub|
|00000300| 73 65 74 20 6f 66 20 43 | 6f 6d 6d 6f 6e 20 4c 69 |set of C|ommon Li|
|00000310| 73 70 2c 20 62 75 74 20 | 69 73 20 72 65 70 72 65 |sp, but |is repre|
|00000320| 73 65 6e 74 65 64 20 61 | 73 20 61 20 66 6c 6f 77 |sented a|s a flow|
|00000330| 2d 67 72 61 70 68 20 72 | 61 74 68 65 72 20 74 68 |-graph r|ather th|
|00000340| 61 6e 20 61 0a 73 79 6e | 74 61 78 20 74 72 65 65 |an a.syn|tax tree|
|00000350| 2e 20 20 50 68 61 73 65 | 73 20 77 68 69 63 68 20 |. Phase|s which |
|00000360| 6f 6e 6c 79 20 6d 61 6e | 69 70 75 6c 61 74 65 20 |only man|ipulate |
|00000370| 49 43 52 20 63 6f 6d 70 | 72 69 73 65 20 74 68 65 |ICR comp|rise the|
|00000380| 20 22 66 72 6f 6e 74 20 | 65 6e 64 22 2e 20 20 49 | "front |end". I|
|00000390| 74 0a 77 6f 75 6c 64 20 | 62 65 20 70 6f 73 73 69 |t.would |be possi|
|000003a0| 62 6c 65 20 74 6f 20 75 | 73 65 20 61 20 64 69 66 |ble to u|se a dif|
|000003b0| 66 65 72 65 6e 74 20 62 | 61 63 6b 20 65 6e 64 20 |ferent b|ack end |
|000003c0| 73 75 63 68 20 61 73 20 | 6f 6e 65 20 74 68 61 74 |such as |one that|
|000003d0| 20 64 69 72 65 63 74 6c | 79 0a 67 65 6e 65 72 61 | directl|y.genera|
|000003e0| 74 65 64 20 63 6f 64 65 | 20 66 6f 72 20 61 20 73 |ted code| for a s|
|000003f0| 74 61 63 6b 20 6d 61 63 | 68 69 6e 65 2e 0a 0a 5c |tack mac|hine...\|
|00000400| 69 74 65 6d 20 54 68 65 | 20 56 69 72 74 75 61 6c |item The| Virtual|
|00000410| 20 4d 61 63 68 69 6e 65 | 20 52 65 70 72 65 73 65 | Machine| Represe|
|00000420| 6e 74 61 74 69 6f 6e 20 | 28 56 4d 52 29 20 72 65 |ntation |(VMR) re|
|00000430| 70 72 65 73 65 6e 74 73 | 20 74 68 65 20 69 6d 70 |presents| the imp|
|00000440| 6c 65 6d 65 6e 74 61 74 | 69 6f 6e 20 6f 66 0a 74 |lementat|ion of.t|
|00000450| 68 65 20 73 6f 75 72 63 | 65 20 63 6f 64 65 20 6f |he sourc|e code o|
|00000460| 6e 20 61 20 76 69 72 74 | 75 61 6c 20 6d 61 63 68 |n a virt|ual mach|
|00000470| 69 6e 65 2e 20 20 54 68 | 65 20 76 69 72 74 75 61 |ine. Th|e virtua|
|00000480| 6c 20 6d 61 63 68 69 6e | 65 20 6d 61 79 20 76 61 |l machin|e may va|
|00000490| 72 79 20 64 65 70 65 6e | 64 69 6e 67 0a 6f 6e 20 |ry depen|ding.on |
|000004a0| 74 68 65 20 74 68 65 20 | 74 61 72 67 65 74 20 68 |the the |target h|
|000004b0| 61 72 64 77 61 72 65 2c | 20 62 75 74 20 56 4d 52 |ardware,| but VMR|
|000004c0| 20 69 73 20 73 75 66 66 | 69 63 69 65 6e 74 6c 79 | is suff|iciently|
|000004d0| 20 73 74 79 6c 69 7a 65 | 64 20 74 68 61 74 20 6d | stylize|d that m|
|000004e0| 6f 73 74 20 6f 66 20 74 | 68 65 0a 70 68 61 73 65 |ost of t|he.phase|
|000004f0| 73 20 77 68 69 63 68 20 | 6d 61 6e 69 70 75 6c 61 |s which |manipula|
|00000500| 74 65 20 69 74 20 61 72 | 65 20 70 6f 72 74 61 62 |te it ar|e portab|
|00000510| 6c 65 2e 0a 5c 65 6e 64 | 7b 69 74 65 6d 69 7a 65 |le..\end|{itemize|
|00000520| 7d 0a 0a 45 61 63 68 20 | 70 68 61 73 65 20 69 73 |}..Each |phase is|
|00000530| 20 62 72 69 65 66 6c 79 | 20 64 65 73 63 72 69 62 | briefly| describ|
|00000540| 65 64 20 68 65 72 65 2e | 20 20 54 68 65 20 70 68 |ed here.| The ph|
|00000550| 61 73 65 73 20 66 72 6f | 6d 20 60 60 6c 6f 63 61 |ases fro|m ``loca|
|00000560| 6c 20 63 61 6c 6c 20 61 | 6e 61 6c 79 73 69 73 27 |l call a|nalysis'|
|00000570| 27 0a 74 6f 20 60 60 63 | 6f 6e 73 74 72 61 69 6e |'.to ``c|onstrain|
|00000580| 74 20 70 72 6f 70 61 67 | 61 74 69 6f 6e 27 27 20 |t propag|ation'' |
|00000590| 61 6c 6c 20 69 6e 74 65 | 72 61 63 74 3b 20 66 6f |all inte|ract; fo|
|000005a0| 72 20 6d 61 78 69 6d 75 | 6d 20 6f 70 74 69 6d 69 |r maximu|m optimi|
|000005b0| 7a 61 74 69 6f 6e 2c 20 | 74 68 65 79 0a 61 72 65 |zation, |they.are|
|000005c0| 20 67 65 6e 65 72 61 6c | 6c 79 20 72 65 70 65 61 | general|ly repea|
|000005d0| 74 65 64 20 75 6e 74 69 | 6c 20 6e 6f 74 68 69 6e |ted unti|l nothin|
|000005e0| 67 20 6e 65 77 20 69 73 | 20 64 69 73 63 6f 76 65 |g new is| discove|
|000005f0| 72 65 64 2e 20 20 54 68 | 65 20 73 6f 75 72 63 65 |red. Th|e source|
|00000600| 20 66 69 6c 65 73 20 77 | 68 69 63 68 0a 70 72 69 | files w|hich.pri|
|00000610| 6d 61 72 69 6c 79 20 63 | 6f 6e 74 61 69 6e 20 65 |marily c|ontain e|
|00000620| 61 63 68 20 70 68 61 73 | 65 20 61 72 65 20 6c 69 |ach phas|e are li|
|00000630| 73 74 65 64 20 61 66 74 | 65 72 20 60 60 46 69 6c |sted aft|er ``Fil|
|00000640| 65 73 3a 20 27 27 2e 0a | 5c 62 65 67 69 6e 7b 64 |es: ''..|\begin{d|
|00000650| 65 73 63 72 69 70 74 69 | 6f 6e 7d 0a 0a 5c 69 74 |escripti|on}..\it|
|00000660| 65 6d 5b 49 43 52 20 63 | 6f 6e 76 65 72 73 69 6f |em[ICR c|onversio|
|00000670| 6e 5d 0a 43 6f 6e 76 65 | 72 74 20 74 68 65 20 73 |n].Conve|rt the s|
|00000680| 6f 75 72 63 65 20 69 6e | 74 6f 20 49 43 52 2c 20 |ource in|to ICR, |
|00000690| 64 6f 69 6e 67 20 6d 61 | 63 72 6f 65 78 70 61 6e |doing ma|croexpan|
|000006a0| 73 69 6f 6e 20 61 6e 64 | 20 73 69 6d 70 6c 65 20 |sion and| simple |
|000006b0| 73 6f 75 72 63 65 2d 74 | 6f 2d 73 6f 75 72 63 65 |source-t|o-source|
|000006c0| 0a 74 72 61 6e 73 66 6f | 72 6d 61 74 69 6f 6e 2e |.transfo|rmation.|
|000006d0| 20 20 41 6c 6c 20 6e 61 | 6d 65 73 20 61 72 65 20 | All na|mes are |
|000006e0| 72 65 73 6f 6c 76 65 64 | 20 61 74 20 74 68 69 73 |resolved| at this|
|000006f0| 20 74 69 6d 65 2c 20 73 | 6f 20 77 65 20 64 6f 6e | time, s|o we don|
|00000700| 27 74 20 68 61 76 65 20 | 74 6f 20 77 6f 72 72 79 |'t have |to worry|
|00000710| 0a 61 62 6f 75 74 20 6e | 61 6d 65 20 63 6f 6e 66 |.about n|ame conf|
|00000720| 6c 69 63 74 73 20 6c 61 | 74 65 72 20 6f 6e 2e 20 |licts la|ter on. |
|00000730| 20 46 69 6c 65 73 3a 20 | 7b 5c 74 74 20 69 72 31 | Files: |{\tt ir1|
|00000740| 74 72 61 6e 2c 20 73 72 | 63 74 72 61 6e 2c 20 74 |tran, sr|ctran, t|
|00000750| 79 70 65 74 72 61 6e 7d | 0a 0a 5c 69 74 65 6d 5b |ypetran}|..\item[|
|00000760| 4c 6f 63 61 6c 20 63 61 | 6c 6c 20 61 6e 61 6c 79 |Local ca|ll analy|
|00000770| 73 69 73 5d 20 46 69 6e | 64 20 63 61 6c 6c 73 20 |sis] Fin|d calls |
|00000780| 74 6f 20 6c 6f 63 61 6c | 20 66 75 6e 63 74 69 6f |to local| functio|
|00000790| 6e 73 20 61 6e 64 20 63 | 6f 6e 76 65 72 74 20 74 |ns and c|onvert t|
|000007a0| 68 65 6d 20 74 6f 0a 6c | 6f 63 61 6c 20 63 61 6c |hem to.l|ocal cal|
|000007b0| 6c 73 20 74 6f 20 74 68 | 65 20 63 6f 72 72 65 63 |ls to th|e correc|
|000007c0| 74 20 65 6e 74 72 79 20 | 70 6f 69 6e 74 2c 20 64 |t entry |point, d|
|000007d0| 6f 69 6e 67 20 6b 65 79 | 77 6f 72 64 20 70 61 72 |oing key|word par|
|000007e0| 73 69 6e 67 2c 20 65 74 | 63 2e 20 20 52 65 63 6f |sing, et|c. Reco|
|000007f0| 67 6e 69 7a 65 0a 6f 6e | 63 65 2d 63 61 6c 6c 65 |gnize.on|ce-calle|
|00000800| 64 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 73 20 6c |d functi|ons as l|
|00000810| 65 74 73 2e 20 20 43 72 | 65 61 74 65 20 7b 5c 69 |ets. Cr|eate {\i|
|00000820| 74 20 65 78 74 65 72 6e | 61 6c 20 65 6e 74 72 79 |t extern|al entry|
|00000830| 20 70 6f 69 6e 74 73 7d | 20 66 6f 72 0a 65 6e 74 | points}| for.ent|
|00000840| 72 79 2d 70 6f 69 6e 74 | 20 66 75 6e 63 74 69 6f |ry-point| functio|
|00000850| 6e 73 2e 20 20 46 69 6c | 65 73 3a 20 7b 5c 74 74 |ns. Fil|es: {\tt|
|00000860| 20 6c 6f 63 61 6c 6c 7d | 0a 0a 5c 69 74 65 6d 5b | locall}|..\item[|
|00000870| 46 69 6e 64 20 63 6f 6d | 70 6f 6e 65 6e 74 73 5d |Find com|ponents]|
|00000880| 0a 46 69 6e 64 20 66 6c | 6f 77 20 67 72 61 70 68 |.Find fl|ow graph|
|00000890| 20 63 6f 6d 70 6f 6e 65 | 6e 74 73 20 61 6e 64 20 | compone|nts and |
|000008a0| 63 6f 6d 70 75 74 65 20 | 64 65 70 74 68 2d 66 69 |compute |depth-fi|
|000008b0| 72 73 74 20 6f 72 64 65 | 72 69 6e 67 2e 20 20 53 |rst orde|ring. S|
|000008c0| 65 70 61 72 61 74 65 0a | 74 6f 70 2d 6c 65 76 65 |eparate.|top-leve|
|000008d0| 6c 20 63 6f 64 65 20 66 | 72 6f 6d 20 72 75 6e 2d |l code f|rom run-|
|000008e0| 74 69 6d 65 20 63 6f 64 | 65 2c 20 61 6e 64 20 64 |time cod|e, and d|
|000008f0| 65 74 65 72 6d 69 6e 65 | 20 77 68 69 63 68 20 63 |etermine| which c|
|00000900| 6f 6d 70 6f 6e 65 6e 74 | 73 20 61 72 65 20 74 6f |omponent|s are to|
|00000910| 70 2d 6c 65 76 65 6c 0a | 63 6f 6d 70 6f 6e 65 6e |p-level.|componen|
|00000920| 74 73 2e 20 20 46 69 6c | 65 73 3a 20 7b 5c 74 74 |ts. Fil|es: {\tt|
|00000930| 20 64 66 6f 7d 0a 0a 5c | 69 74 65 6d 5b 49 43 52 | dfo}..\|item[ICR|
|00000940| 20 6f 70 74 69 6d 69 7a | 65 5d 20 41 20 67 72 61 | optimiz|e] A gra|
|00000950| 62 2d 62 61 67 20 6f 66 | 20 61 6c 6c 20 74 68 65 |b-bag of| all the|
|00000960| 20 6e 6f 6e 2d 66 6c 6f | 77 20 49 43 52 20 6f 70 | non-flo|w ICR op|
|00000970| 74 69 6d 69 7a 61 74 69 | 6f 6e 73 2e 20 20 46 6f |timizati|ons. Fo|
|00000980| 6c 64 0a 63 6f 6e 73 74 | 61 6e 74 20 66 75 6e 63 |ld.const|ant func|
|00000990| 74 69 6f 6e 73 2c 20 70 | 72 6f 70 61 67 61 74 65 |tions, p|ropagate|
|000009a0| 20 74 79 70 65 73 20 61 | 6e 64 20 65 6c 69 6d 69 | types a|nd elimi|
|000009b0| 6e 61 74 65 20 63 6f 64 | 65 20 74 68 61 74 20 63 |nate cod|e that c|
|000009c0| 6f 6d 70 75 74 65 73 20 | 75 6e 75 73 65 64 0a 76 |omputes |unused.v|
|000009d0| 61 6c 75 65 73 2e 20 20 | 53 70 65 63 69 61 6c 2d |alues. |Special-|
|000009e0| 63 61 73 65 20 63 61 6c | 6c 73 20 74 6f 20 73 6f |case cal|ls to so|
|000009f0| 6d 65 20 6b 6e 6f 77 6e | 20 67 6c 6f 62 61 6c 20 |me known| global |
|00000a00| 66 75 6e 63 74 69 6f 6e | 73 20 62 79 20 72 65 70 |function|s by rep|
|00000a10| 6c 61 63 69 6e 67 20 74 | 68 65 6d 0a 77 69 74 68 |lacing t|hem.with|
|00000a20| 20 61 20 63 6f 6d 70 75 | 74 65 64 20 66 75 6e 63 | a compu|ted func|
|00000a30| 74 69 6f 6e 2e 20 20 4d | 65 72 67 65 20 62 6c 6f |tion. M|erge blo|
|00000a40| 63 6b 73 20 61 6e 64 20 | 65 6c 69 6d 69 6e 61 74 |cks and |eliminat|
|00000a50| 65 20 49 46 2d 49 46 73 | 2e 20 20 53 75 62 73 74 |e IF-IFs|. Subst|
|00000a60| 69 74 75 74 65 20 6c 65 | 74 0a 76 61 72 69 61 62 |itute le|t.variab|
|00000a70| 6c 65 73 2e 20 20 46 69 | 6c 65 73 3a 20 7b 5c 74 |les. Fi|les: {\t|
|00000a80| 74 20 69 72 31 6f 70 74 | 2c 20 69 72 31 74 72 61 |t ir1opt|, ir1tra|
|00000a90| 6e 2c 20 74 79 70 65 74 | 72 61 6e 2c 20 73 65 71 |n, typet|ran, seq|
|00000aa0| 74 72 61 6e 2c 20 76 6d | 2f 76 6d 2d 74 72 61 6e |tran, vm|/vm-tran|
|00000ab0| 7d 0a 0a 5c 69 74 65 6d | 5b 54 79 70 65 20 63 6f |}..\item|[Type co|
|00000ac0| 6e 73 74 72 61 69 6e 74 | 20 70 72 6f 70 61 67 61 |nstraint| propaga|
|00000ad0| 74 69 6f 6e 5d 0a 55 73 | 65 20 67 6c 6f 62 61 6c |tion].Us|e global|
|00000ae0| 20 66 6c 6f 77 20 61 6e | 61 6c 79 73 69 73 20 74 | flow an|alysis t|
|00000af0| 6f 20 70 72 6f 70 61 67 | 61 74 65 20 69 6e 66 6f |o propag|ate info|
|00000b00| 72 6d 61 74 69 6f 6e 20 | 61 62 6f 75 74 20 6c 65 |rmation |about le|
|00000b10| 78 69 63 61 6c 20 76 61 | 72 69 61 62 6c 65 0a 74 |xical va|riable.t|
|00000b20| 79 70 65 73 2e 20 20 20 | 45 6c 69 6d 69 6e 61 74 |ypes. |Eliminat|
|00000b30| 65 20 75 6e 6e 65 63 65 | 73 73 61 72 79 20 74 79 |e unnece|ssary ty|
|00000b40| 70 65 20 63 68 65 63 6b | 73 20 61 6e 64 20 74 65 |pe check|s and te|
|00000b50| 73 74 73 2e 20 20 46 69 | 6c 65 73 3a 20 7b 5c 74 |sts. Fi|les: {\t|
|00000b60| 74 20 63 6f 6e 73 74 72 | 61 69 6e 74 7d 0a 0a 5c |t constr|aint}..\|
|00000b70| 69 74 65 6d 5b 54 79 70 | 65 20 63 68 65 63 6b 20 |item[Typ|e check |
|00000b80| 67 65 6e 65 72 61 74 69 | 6f 6e 5d 0a 45 6d 69 74 |generati|on].Emit|
|00000b90| 20 65 78 70 6c 69 63 69 | 74 20 49 43 52 20 63 6f | explici|t ICR co|
|00000ba0| 64 65 20 66 6f 72 20 61 | 6e 79 20 6e 65 63 65 73 |de for a|ny neces|
|00000bb0| 73 61 72 79 20 74 79 70 | 65 20 63 68 65 63 6b 73 |sary typ|e checks|
|00000bc0| 20 74 68 61 74 20 61 72 | 65 20 74 6f 6f 20 63 6f | that ar|e too co|
|00000bd0| 6d 70 6c 65 78 20 74 6f | 20 62 65 0a 65 61 73 69 |mplex to| be.easi|
|00000be0| 6c 79 20 67 65 6e 65 72 | 61 74 65 64 20 6f 6e 20 |ly gener|ated on |
|00000bf0| 74 68 65 20 66 6c 79 20 | 62 79 20 74 68 65 20 62 |the fly |by the b|
|00000c00| 61 63 6b 20 65 6e 64 2e | 20 20 46 69 6c 65 73 3a |ack end.| Files:|
|00000c10| 20 7b 5c 74 74 20 63 68 | 65 63 6b 67 65 6e 7d 0a | {\tt ch|eckgen}.|
|00000c20| 0a 5c 69 74 65 6d 5b 45 | 76 65 6e 74 20 64 72 69 |.\item[E|vent dri|
|00000c30| 76 65 6e 20 6f 70 65 72 | 61 74 69 6f 6e 73 5d 0a |ven oper|ations].|
|00000c40| 56 61 72 69 6f 75 73 20 | 70 61 72 74 73 20 6f 66 |Various |parts of|
|00000c50| 20 49 43 52 20 61 72 65 | 20 69 6e 63 72 65 6d 65 | ICR are| increme|
|00000c60| 6e 74 61 6c 6c 79 20 72 | 65 63 6f 6d 70 75 74 65 |ntally r|ecompute|
|00000c70| 64 2c 20 65 69 74 68 65 | 72 20 65 61 67 65 72 6c |d, eithe|r eagerl|
|00000c80| 79 20 6f 6e 0a 6d 6f 64 | 69 66 69 63 61 74 69 6f |y on.mod|ificatio|
|00000c90| 6e 20 6f 66 20 74 68 65 | 20 49 43 52 2c 20 6f 72 |n of the| ICR, or|
|00000ca0| 20 6c 61 7a 69 6c 79 2c | 20 77 68 65 6e 20 74 68 | lazily,| when th|
|00000cb0| 65 20 72 65 6c 65 76 61 | 6e 74 20 69 6e 66 6f 72 |e releva|nt infor|
|00000cc0| 6d 61 74 69 6f 6e 20 69 | 73 20 6e 65 65 64 65 64 |mation i|s needed|
|00000cd0| 2e 0a 5c 62 65 67 69 6e | 7b 69 74 65 6d 69 7a 65 |..\begin|{itemize|
|00000ce0| 7d 0a 5c 69 74 65 6d 20 | 43 68 65 63 6b 20 74 68 |}.\item |Check th|
|00000cf0| 61 74 20 74 79 70 65 20 | 61 73 73 65 72 74 69 6f |at type |assertio|
|00000d00| 6e 73 20 61 72 65 20 73 | 61 74 69 73 66 69 65 64 |ns are s|atisfied|
|00000d10| 2c 20 6d 61 72 6b 69 6e | 67 20 70 6c 61 63 65 73 |, markin|g places|
|00000d20| 20 77 68 65 72 65 20 74 | 79 70 65 0a 63 68 65 63 | where t|ype.chec|
|00000d30| 6b 73 20 6e 65 65 64 20 | 74 6f 20 62 65 20 64 6f |ks need |to be do|
|00000d40| 6e 65 2e 0a 0a 5c 69 74 | 65 6d 20 4c 6f 63 61 74 |ne...\it|em Locat|
|00000d50| 65 20 6c 65 74 20 63 61 | 6c 6c 73 2e 0a 0a 5c 69 |e let ca|lls...\i|
|00000d60| 74 65 6d 20 44 65 6c 65 | 74 65 20 66 75 6e 63 74 |tem Dele|te funct|
|00000d70| 69 6f 6e 73 20 61 6e 64 | 20 76 61 72 69 61 62 6c |ions and| variabl|
|00000d80| 65 73 20 77 69 74 68 20 | 6e 6f 20 72 65 66 65 72 |es with |no refer|
|00000d90| 65 6e 63 65 73 0a 5c 65 | 6e 64 7b 69 74 65 6d 69 |ences.\e|nd{itemi|
|00000da0| 7a 65 7d 0a 46 69 6c 65 | 73 3a 20 7b 5c 74 74 20 |ze}.File|s: {\tt |
|00000db0| 69 72 31 75 74 69 6c 7d | 2c 20 7b 5c 74 74 20 69 |ir1util}|, {\tt i|
|00000dc0| 72 31 6f 70 74 7d 0a 0a | 5c 69 74 65 6d 5b 49 43 |r1opt}..|\item[IC|
|00000dd0| 52 20 66 69 6e 61 6c 69 | 7a 65 5d 0a 54 68 69 73 |R finali|ze].This|
|00000de0| 20 70 68 61 73 65 20 69 | 73 20 72 75 6e 20 61 66 | phase i|s run af|
|00000df0| 74 65 72 20 61 6c 6c 20 | 63 6f 6d 70 6f 6e 65 6e |ter all |componen|
|00000e00| 74 73 20 68 61 76 65 20 | 62 65 65 6e 20 63 6f 6d |ts have |been com|
|00000e10| 70 69 6c 65 64 2e 20 20 | 49 74 20 73 63 61 6e 73 |piled. |It scans|
|00000e20| 20 74 68 65 0a 67 6c 6f | 62 61 6c 20 76 61 72 69 | the.glo|bal vari|
|00000e30| 61 62 6c 65 20 72 65 66 | 65 72 65 6e 63 65 73 2c |able ref|erences,|
|00000e40| 20 6c 6f 6f 6b 69 6e 67 | 20 66 6f 72 20 72 65 66 | looking| for ref|
|00000e50| 65 72 65 6e 63 65 73 20 | 74 6f 20 75 6e 64 65 66 |erences |to undef|
|00000e60| 69 6e 65 64 20 76 61 72 | 69 61 62 6c 65 73 0a 61 |ined var|iables.a|
|00000e70| 6e 64 20 69 6e 63 6f 6d | 70 61 74 69 62 6c 65 20 |nd incom|patible |
|00000e80| 66 75 6e 63 74 69 6f 6e | 20 72 65 64 65 66 69 6e |function| redefin|
|00000e90| 69 74 69 6f 6e 73 2e 20 | 20 46 69 6c 65 73 3a 20 |itions. | Files: |
|00000ea0| 7b 5c 74 74 20 69 72 31 | 66 69 6e 61 6c 7d 2c 20 |{\tt ir1|final}, |
|00000eb0| 7b 5c 74 74 20 6d 61 69 | 6e 7d 2e 0a 0a 5c 69 74 |{\tt mai|n}...\it|
|00000ec0| 65 6d 5b 45 6e 76 69 72 | 6f 6e 6d 65 6e 74 20 61 |em[Envir|onment a|
|00000ed0| 6e 61 6c 79 73 69 73 5d | 0a 44 65 74 65 72 6d 69 |nalysis]|.Determi|
|00000ee0| 6e 65 20 77 68 69 63 68 | 20 64 69 73 74 69 6e 63 |ne which| distinc|
|00000ef0| 74 20 65 6e 76 69 72 6f | 6e 6d 65 6e 74 73 20 6e |t enviro|nments n|
|00000f00| 65 65 64 20 74 6f 20 62 | 65 20 61 6c 6c 6f 63 61 |eed to b|e alloca|
|00000f10| 74 65 64 2c 20 61 6e 64 | 20 77 68 61 74 0a 63 6f |ted, and| what.co|
|00000f20| 6e 74 65 78 74 20 6e 65 | 65 64 65 64 20 74 6f 20 |ntext ne|eded to |
|00000f30| 62 65 20 63 6c 6f 73 65 | 64 20 6f 76 65 72 20 62 |be close|d over b|
|00000f40| 79 20 65 61 63 68 20 65 | 6e 76 69 72 6f 6e 6d 65 |y each e|nvironme|
|00000f50| 6e 74 2e 20 20 57 65 20 | 64 65 74 65 63 74 20 6e |nt. We |detect n|
|00000f60| 6f 6e 2d 6c 6f 63 61 6c | 0a 65 78 69 74 73 20 61 |on-local|.exits a|
|00000f70| 6e 64 20 73 65 74 20 63 | 6c 6f 73 75 72 65 20 76 |nd set c|losure v|
|00000f80| 61 72 69 61 62 6c 65 73 | 2e 20 20 57 65 20 61 6c |ariables|. We al|
|00000f90| 73 6f 20 65 6d 69 74 20 | 63 6c 65 61 6e 75 70 20 |so emit |cleanup |
|00000fa0| 63 6f 64 65 20 61 73 20 | 66 75 6e 6e 79 0a 66 75 |code as |funny.fu|
|00000fb0| 6e 63 74 69 6f 6e 20 63 | 61 6c 6c 73 2e 20 20 54 |nction c|alls. T|
|00000fc0| 68 69 73 20 69 73 20 74 | 68 65 20 6c 61 73 74 20 |his is t|he last |
|00000fd0| 70 75 72 65 20 49 43 52 | 20 70 61 73 73 2e 20 20 |pure ICR| pass. |
|00000fe0| 46 69 6c 65 73 3a 20 7b | 5c 74 74 20 65 6e 76 61 |Files: {|\tt enva|
|00000ff0| 6e 61 6c 7d 0a 0a 5c 69 | 74 65 6d 5b 47 6c 6f 62 |nal}..\i|tem[Glob|
|00001000| 61 6c 20 54 4e 20 61 6c | 6c 6f 63 61 74 69 6f 6e |al TN al|location|
|00001010| 20 28 47 54 4e 29 5d 0a | 49 74 65 72 61 74 65 20 | (GTN)].|Iterate |
|00001020| 6f 76 65 72 20 61 6c 6c | 20 64 65 66 69 6e 65 64 |over all| defined|
|00001030| 20 66 75 6e 63 74 69 6f | 6e 73 2c 20 64 65 74 65 | functio|ns, dete|
|00001040| 72 6d 69 6e 69 6e 67 20 | 63 61 6c 6c 69 6e 67 20 |rmining |calling |
|00001050| 63 6f 6e 76 65 6e 74 69 | 6f 6e 73 0a 61 6e 64 20 |conventi|ons.and |
|00001060| 61 73 73 69 67 6e 69 6e | 67 20 54 4e 73 20 74 6f |assignin|g TNs to|
|00001070| 20 6c 6f 63 61 6c 20 76 | 61 72 69 61 62 6c 65 73 | local v|ariables|
|00001080| 2e 20 20 46 69 6c 65 73 | 3a 20 7b 5c 74 74 20 67 |. Files|: {\tt g|
|00001090| 74 6e 7d 0a 0a 5c 69 74 | 65 6d 5b 4c 6f 63 61 6c |tn}..\it|em[Local|
|000010a0| 20 54 4e 20 61 6c 6c 6f | 63 61 74 69 6f 6e 20 28 | TN allo|cation (|
|000010b0| 4c 54 4e 29 5d 0a 55 73 | 65 20 74 79 70 65 20 61 |LTN)].Us|e type a|
|000010c0| 6e 64 20 70 6f 6c 69 63 | 79 20 69 6e 66 6f 72 6d |nd polic|y inform|
|000010d0| 61 74 69 6f 6e 20 74 6f | 20 64 65 74 65 72 6d 69 |ation to| determi|
|000010e0| 6e 65 20 77 68 69 63 68 | 20 56 4d 52 20 74 72 61 |ne which| VMR tra|
|000010f0| 6e 73 6c 61 74 69 6f 6e | 20 74 6f 20 75 73 65 0a |nslation| to use.|
|00001100| 66 6f 72 20 6b 6e 6f 77 | 6e 20 66 75 6e 63 74 69 |for know|n functi|
|00001110| 6f 6e 73 2c 20 61 6e 64 | 20 74 68 65 6e 20 63 72 |ons, and| then cr|
|00001120| 65 61 74 65 20 54 4e 73 | 20 66 6f 72 20 65 78 70 |eate TNs| for exp|
|00001130| 72 65 73 73 69 6f 6e 20 | 65 76 61 6c 75 61 74 69 |ression |evaluati|
|00001140| 6f 6e 0a 74 65 6d 70 6f | 72 61 72 69 65 73 2e 20 |on.tempo|raries. |
|00001150| 20 57 65 20 61 6c 73 6f | 20 61 63 63 75 6d 75 6c | We also| accumul|
|00001160| 61 74 65 20 73 6f 6d 65 | 20 72 61 6e 64 6f 6d 20 |ate some| random |
|00001170| 69 6e 66 6f 72 6d 61 74 | 69 6f 6e 20 6e 65 65 64 |informat|ion need|
|00001180| 65 64 20 62 79 20 56 4d | 52 0a 63 6f 6e 76 65 72 |ed by VM|R.conver|
|00001190| 73 69 6f 6e 2e 20 20 46 | 69 6c 65 73 3a 20 7b 5c |sion. F|iles: {\|
|000011a0| 74 74 20 6c 74 6e 7d 0a | 0a 5c 69 74 65 6d 5b 43 |tt ltn}.|.\item[C|
|000011b0| 6f 6e 74 72 6f 6c 20 61 | 6e 61 6c 79 73 69 73 5d |ontrol a|nalysis]|
|000011c0| 0a 4c 69 6e 65 61 72 69 | 7a 65 20 74 68 65 20 66 |.Lineari|ze the f|
|000011d0| 6c 6f 77 20 67 72 61 70 | 68 20 69 6e 20 61 20 77 |low grap|h in a w|
|000011e0| 61 79 20 74 68 61 74 20 | 6d 69 6e 69 6d 69 7a 65 |ay that |minimize|
|000011f0| 73 20 74 68 65 20 6e 75 | 6d 62 65 72 20 6f 66 20 |s the nu|mber of |
|00001200| 62 72 61 6e 63 68 65 73 | 2e 20 20 54 68 65 0a 62 |branches|. The.b|
|00001210| 6c 6f 63 6b 2d 6c 65 76 | 65 6c 20 73 74 72 75 63 |lock-lev|el struc|
|00001220| 74 75 72 65 20 6f 66 20 | 74 68 65 20 66 6c 6f 77 |ture of |the flow|
|00001230| 20 67 72 61 70 68 20 69 | 73 20 62 61 73 69 63 61 | graph i|s basica|
|00001240| 6c 6c 79 20 66 72 6f 7a | 65 6e 20 61 74 20 74 68 |lly froz|en at th|
|00001250| 69 73 20 70 6f 69 6e 74 | 2e 0a 46 69 6c 65 73 3a |is point|..Files:|
|00001260| 20 7b 5c 74 74 20 63 6f | 6e 74 72 6f 6c 7d 0a 0a | {\tt co|ntrol}..|
|00001270| 5c 69 74 65 6d 5b 53 74 | 61 63 6b 20 61 6e 61 6c |\item[St|ack anal|
|00001280| 79 73 69 73 5d 0a 4d 61 | 69 6e 74 61 69 6e 20 73 |ysis].Ma|intain s|
|00001290| 74 61 63 6b 20 64 69 73 | 63 69 70 6c 69 6e 65 20 |tack dis|cipline |
|000012a0| 66 6f 72 20 75 6e 6b 6e | 6f 77 6e 2d 76 61 6c 75 |for unkn|own-valu|
|000012b0| 65 73 20 63 6f 6e 74 69 | 6e 75 61 74 69 6f 6e 20 |es conti|nuation |
|000012c0| 69 6e 20 74 68 65 20 70 | 72 65 73 65 6e 63 65 0a |in the p|resence.|
|000012d0| 6f 66 20 6c 6f 63 61 6c | 20 65 78 69 74 73 2e 20 |of local| exits. |
|000012e0| 20 46 69 6c 65 73 3a 20 | 7b 5c 74 74 20 73 74 61 | Files: |{\tt sta|
|000012f0| 63 6b 7d 0a 0a 5c 69 74 | 65 6d 5b 45 6e 74 72 79 |ck}..\it|em[Entry|
|00001300| 20 61 6e 61 6c 79 73 69 | 73 5d 0a 43 6f 6c 6c 65 | analysi|s].Colle|
|00001310| 63 74 20 73 6f 6d 65 20 | 62 61 63 6b 2d 65 6e 64 |ct some |back-end|
|00001320| 20 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 66 6f 72 | informa|tion for|
|00001330| 20 65 61 63 68 20 65 78 | 74 65 72 6e 61 6c 6c 79 | each ex|ternally|
|00001340| 20 63 61 6c 6c 61 62 6c | 65 20 66 75 6e 63 74 69 | callabl|e functi|
|00001350| 6f 6e 2e 0a 0a 5c 69 74 | 65 6d 5b 56 4d 52 20 63 |on...\it|em[VMR c|
|00001360| 6f 6e 76 65 72 73 69 6f | 6e 5d 20 43 6f 6e 76 65 |onversio|n] Conve|
|00001370| 72 74 20 49 43 52 20 69 | 6e 74 6f 20 56 4d 52 20 |rt ICR i|nto VMR |
|00001380| 62 79 20 74 72 61 6e 73 | 6c 61 74 69 6e 67 20 6e |by trans|lating n|
|00001390| 6f 64 65 73 20 69 6e 74 | 6f 20 56 4f 50 73 2e 0a |odes int|o VOPs..|
|000013a0| 45 6d 69 74 20 74 79 70 | 65 20 63 68 65 63 6b 73 |Emit typ|e checks|
|000013b0| 2e 20 20 46 69 6c 65 73 | 3a 20 7b 5c 74 74 20 69 |. Files|: {\tt i|
|000013c0| 72 32 74 72 61 6e 2c 20 | 76 6d 64 65 66 7d 0a 0a |r2tran, |vmdef}..|
|000013d0| 5c 69 74 65 6d 5b 43 6f | 70 79 20 70 72 6f 70 61 |\item[Co|py propa|
|000013e0| 67 61 74 69 6f 6e 5d 20 | 55 73 65 20 66 6c 6f 77 |gation] |Use flow|
|000013f0| 20 61 6e 61 6c 79 73 69 | 73 20 74 6f 20 65 6c 69 | analysi|s to eli|
|00001400| 6d 69 6e 61 74 65 20 75 | 6e 6e 65 63 65 73 73 61 |minate u|nnecessa|
|00001410| 72 79 20 63 6f 70 79 69 | 6e 67 20 6f 66 0a 54 4e |ry copyi|ng of.TN|
|00001420| 20 76 61 6c 75 65 73 2e | 20 20 46 69 6c 65 73 3a | values.| Files:|
|00001430| 20 7b 5c 74 74 20 63 6f | 70 79 70 72 6f 70 7d 0a | {\tt co|pyprop}.|
|00001440| 0a 5c 69 74 65 6d 5b 52 | 65 70 72 65 73 65 6e 74 |.\item[R|epresent|
|00001450| 61 74 69 6f 6e 20 73 65 | 6c 65 63 74 69 6f 6e 5d |ation se|lection]|
|00001460| 0a 4c 6f 6f 6b 20 61 74 | 20 61 6c 6c 20 72 65 66 |.Look at| all ref|
|00001470| 65 72 65 6e 63 65 73 20 | 74 6f 20 65 61 63 68 20 |erences |to each |
|00001480| 54 4e 20 74 6f 20 64 65 | 74 65 72 6d 69 6e 65 20 |TN to de|termine |
|00001490| 77 68 69 63 68 20 72 65 | 70 72 65 73 65 6e 74 61 |which re|presenta|
|000014a0| 74 69 6f 6e 20 68 61 73 | 20 74 68 65 0a 6c 6f 77 |tion has| the.low|
|000014b0| 65 73 74 20 63 6f 73 74 | 2e 20 20 45 6d 69 74 20 |est cost|. Emit |
|000014c0| 61 70 70 72 6f 70 72 69 | 61 74 65 20 6d 6f 76 65 |appropri|ate move|
|000014d0| 20 61 6e 64 20 63 6f 65 | 72 63 65 20 56 4f 50 53 | and coe|rce VOPS|
|000014e0| 20 66 6f 72 20 74 68 61 | 74 20 72 65 70 72 65 73 | for tha|t repres|
|000014f0| 65 6e 74 61 74 69 6f 6e | 2e 0a 0a 5c 69 74 65 6d |entation|...\item|
|00001500| 5b 4c 69 66 65 74 69 6d | 65 20 61 6e 61 6c 79 73 |[Lifetim|e analys|
|00001510| 69 73 5d 0a 44 6f 20 66 | 6c 6f 77 20 61 6e 61 6c |is].Do f|low anal|
|00001520| 79 73 69 73 20 74 6f 20 | 66 69 6e 64 20 74 68 65 |ysis to |find the|
|00001530| 20 73 65 74 20 6f 66 20 | 54 4e 73 20 77 68 6f 73 | set of |TNs whos|
|00001540| 65 20 6c 69 66 65 74 69 | 6d 65 73 20 0a 6f 76 65 |e lifeti|mes .ove|
|00001550| 72 6c 61 70 20 77 69 74 | 68 20 74 68 65 20 6c 69 |rlap wit|h the li|
|00001560| 66 65 74 69 6d 65 73 20 | 6f 66 20 65 61 63 68 20 |fetimes |of each |
|00001570| 54 4e 20 62 65 69 6e 67 | 20 70 61 63 6b 65 64 2e |TN being| packed.|
|00001580| 20 20 41 6e 6e 6f 74 61 | 74 65 20 63 61 6c 6c 20 | Annota|te call |
|00001590| 56 4f 50 73 20 77 69 74 | 68 0a 74 68 65 20 54 4e |VOPs wit|h.the TN|
|000015a0| 73 20 74 68 61 74 20 6e | 65 65 64 20 74 6f 20 62 |s that n|eed to b|
|000015b0| 65 20 73 61 76 65 64 2e | 20 20 46 69 6c 65 73 3a |e saved.| Files:|
|000015c0| 20 7b 5c 74 74 20 6c 69 | 66 65 7d 0a 0a 5c 69 74 | {\tt li|fe}..\it|
|000015d0| 65 6d 5b 50 61 63 6b 5d | 0a 46 69 6e 64 20 61 20 |em[Pack]|.Find a |
|000015e0| 6c 65 67 61 6c 20 72 65 | 67 69 73 74 65 72 20 61 |legal re|gister a|
|000015f0| 6c 6c 6f 63 61 74 69 6f | 6e 2c 20 61 74 74 65 6d |llocatio|n, attem|
|00001600| 70 74 69 6e 67 20 74 6f | 20 6d 69 6e 69 6d 69 7a |pting to| minimiz|
|00001610| 65 20 75 6e 6e 65 63 65 | 73 73 61 72 79 20 6d 6f |e unnece|ssary mo|
|00001620| 76 65 73 2e 0a 46 69 6c | 65 73 3a 20 7b 5c 74 74 |ves..Fil|es: {\tt|
|00001630| 20 70 61 63 6b 7d 0a 0a | 5c 69 74 65 6d 5b 43 6f | pack}..|\item[Co|
|00001640| 64 65 20 67 65 6e 65 72 | 61 74 69 6f 6e 5d 0a 43 |de gener|ation].C|
|00001650| 61 6c 6c 20 74 68 65 20 | 56 4f 50 20 67 65 6e 65 |all the |VOP gene|
|00001660| 72 61 74 6f 72 73 20 74 | 6f 20 65 6d 69 74 20 61 |rators t|o emit a|
|00001670| 73 73 65 6d 62 6c 79 20 | 63 6f 64 65 2e 20 20 46 |ssembly |code. F|
|00001680| 69 6c 65 73 3a 20 7b 5c | 74 74 20 63 6f 64 65 67 |iles: {\|tt codeg|
|00001690| 65 6e 7d 0a 0a 5c 69 74 | 65 6d 5b 50 69 70 65 6c |en}..\it|em[Pipel|
|000016a0| 69 6e 65 20 72 65 6f 72 | 67 61 6e 69 7a 61 74 69 |ine reor|ganizati|
|000016b0| 6f 6e 5d 20 4f 6e 20 73 | 6f 6d 65 20 6d 61 63 68 |on] On s|ome mach|
|000016c0| 69 6e 65 73 2c 20 6d 6f | 76 65 20 6d 65 6d 6f 72 |ines, mo|ve memor|
|000016d0| 79 20 72 65 66 65 72 65 | 6e 63 65 73 0a 62 61 63 |y refere|nces.bac|
|000016e0| 6b 77 61 72 64 20 69 6e | 20 74 68 65 20 63 6f 64 |kward in| the cod|
|000016f0| 65 20 73 6f 20 74 68 61 | 74 20 74 68 65 79 20 63 |e so tha|t they c|
|00001700| 61 6e 20 6f 76 65 72 6c | 61 70 20 77 69 74 68 20 |an overl|ap with |
|00001710| 63 6f 6d 70 75 74 61 74 | 69 6f 6e 2e 20 20 4f 6e |computat|ion. On|
|00001720| 20 6d 61 63 68 69 6e 65 | 73 0a 77 69 74 68 20 64 | machine|s.with d|
|00001730| 65 6c 61 79 65 64 20 62 | 72 61 6e 63 68 20 69 6e |elayed b|ranch in|
|00001740| 73 74 72 75 63 74 69 6f | 6e 73 2c 20 6c 6f 63 61 |structio|ns, loca|
|00001750| 74 65 20 69 6e 73 74 72 | 75 63 74 69 6f 6e 73 20 |te instr|uctions |
|00001760| 74 68 61 74 20 63 61 6e | 20 62 65 20 6d 6f 76 65 |that can| be move|
|00001770| 64 20 69 6e 74 6f 0a 64 | 65 6c 61 79 20 73 6c 6f |d into.d|elay slo|
|00001780| 74 73 2e 20 20 46 69 6c | 65 73 3a 20 7b 5c 74 74 |ts. Fil|es: {\tt|
|00001790| 20 61 73 73 65 6d 2d 6f | 70 74 7d 0a 0a 5c 69 74 | assem-o|pt}..\it|
|000017a0| 65 6d 5b 41 73 73 65 6d | 62 6c 79 5d 0a 52 65 73 |em[Assem|bly].Res|
|000017b0| 6f 6c 76 65 20 62 72 61 | 6e 63 68 65 73 20 61 6e |olve bra|nches an|
|000017c0| 64 20 63 6f 6e 76 65 72 | 74 20 69 6e 20 74 6f 20 |d conver|t in to |
|000017d0| 6f 62 6a 65 63 74 20 63 | 6f 64 65 20 61 6e 64 20 |object c|ode and |
|000017e0| 66 69 78 75 70 20 69 6e | 66 6f 72 6d 61 74 69 6f |fixup in|formatio|
|000017f0| 6e 2e 0a 46 69 6c 65 73 | 3a 20 7b 5c 74 74 20 61 |n..Files|: {\tt a|
|00001800| 73 73 65 6d 62 6c 65 72 | 7d 0a 0a 5c 69 74 65 6d |ssembler|}..\item|
|00001810| 5b 44 75 6d 70 69 6e 67 | 5d 20 43 6f 6e 76 65 72 |[Dumping|] Conver|
|00001820| 74 20 74 68 65 20 63 6f | 6d 70 69 6c 65 64 20 63 |t the co|mpiled c|
|00001830| 6f 64 65 20 69 6e 74 6f | 20 61 6e 20 6f 62 6a 65 |ode into| an obje|
|00001840| 63 74 20 66 69 6c 65 20 | 6f 72 20 69 6e 2d 63 6f |ct file |or in-co|
|00001850| 72 65 0a 66 75 6e 63 74 | 69 6f 6e 2e 20 20 46 69 |re.funct|ion. Fi|
|00001860| 6c 65 73 3a 20 7b 5c 74 | 74 20 64 65 62 75 67 2d |les: {\t|t debug-|
|00001870| 64 75 6d 70 7d 2c 20 7b | 5c 74 74 20 64 75 6d 70 |dump}, {|\tt dump|
|00001880| 7d 2c 20 7b 5c 74 74 20 | 76 6d 2f 63 6f 72 65 7d |}, {\tt |vm/core}|
|00001890| 0a 0a 5c 65 6e 64 7b 64 | 65 73 63 72 69 70 74 69 |..\end{d|escripti|
|000018a0| 6f 6e 7d 0a 0a 5c 63 68 | 61 70 74 65 72 7b 54 68 |on}..\ch|apter{Th|
|000018b0| 65 20 49 6d 70 6c 69 63 | 69 74 20 43 6f 6e 74 69 |e Implic|it Conti|
|000018c0| 6e 75 61 74 69 6f 6e 20 | 52 65 70 72 65 73 65 6e |nuation |Represen|
|000018d0| 74 61 74 69 6f 6e 7d 0a | 0a 54 68 65 20 73 65 74 |tation}.|.The set|
|000018e0| 20 6f 66 20 73 70 65 63 | 69 61 6c 20 66 6f 72 6d | of spec|ial form|
|000018f0| 73 20 72 65 63 6f 67 6e | 69 7a 65 64 20 69 73 20 |s recogn|ized is |
|00001900| 65 78 61 63 74 6c 79 20 | 74 68 61 74 20 73 70 65 |exactly |that spe|
|00001910| 63 69 66 69 65 64 20 69 | 6e 20 74 68 65 20 43 6f |cified i|n the Co|
|00001920| 6d 6d 6f 6e 0a 4c 69 73 | 70 20 6d 61 6e 75 61 6c |mmon.Lis|p manual|
|00001930| 2e 20 20 45 76 65 72 79 | 74 68 69 6e 67 20 74 68 |. Every|thing th|
|00001940| 61 74 20 69 73 20 64 65 | 73 63 72 69 62 65 64 20 |at is de|scribed |
|00001950| 61 73 20 61 20 6d 61 63 | 72 6f 20 69 6e 20 43 4c |as a mac|ro in CL|
|00001960| 54 4c 20 69 73 20 61 20 | 6d 61 63 72 6f 2e 0a 0a |TL is a |macro...|
|00001970| 4c 61 72 67 65 20 61 6d | 6f 75 6e 74 73 20 6f 66 |Large am|ounts of|
|00001980| 20 73 79 6e 74 61 63 74 | 69 63 20 69 6e 66 6f 72 | syntact|ic infor|
|00001990| 6d 61 74 69 6f 6e 20 61 | 72 65 20 74 68 72 6f 77 |mation a|re throw|
|000019a0| 6e 20 61 77 61 79 20 62 | 79 20 74 68 65 20 63 6f |n away b|y the co|
|000019b0| 6e 76 65 72 73 69 6f 6e | 20 74 6f 20 61 6e 0a 61 |nversion| to an.a|
|000019c0| 6e 6f 6e 79 6d 6f 75 73 | 20 66 6c 6f 77 20 67 72 |nonymous| flow gr|
|000019d0| 61 70 68 20 72 65 70 72 | 65 73 65 6e 74 61 74 69 |aph repr|esentati|
|000019e0| 6f 6e 2e 20 20 54 68 65 | 20 65 6c 69 6d 69 6e 61 |on. The| elimina|
|000019f0| 74 69 6f 6e 20 6f 66 20 | 6e 61 6d 65 73 20 65 6c |tion of |names el|
|00001a00| 69 6d 69 6e 61 74 65 73 | 20 74 68 65 0a 6e 65 65 |iminates| the.nee|
|00001a10| 64 20 74 6f 20 72 65 70 | 72 65 73 65 6e 74 20 6d |d to rep|resent m|
|00001a20| 6f 73 74 20 65 6e 76 69 | 72 6f 6e 6d 65 6e 74 20 |ost envi|ronment |
|00001a30| 6d 61 6e 69 70 75 6c 61 | 74 69 6f 6e 20 73 70 65 |manipula|tion spe|
|00001a40| 63 69 61 6c 20 66 6f 72 | 6d 73 2e 20 20 54 68 65 |cial for|ms. The|
|00001a50| 20 65 78 70 6c 69 63 69 | 74 0a 72 65 70 72 65 73 | explici|t.repres|
|00001a60| 65 6e 74 61 74 69 6f 6e | 20 6f 66 20 63 6f 6e 74 |entation| of cont|
|00001a70| 72 6f 6c 20 65 6c 69 6d | 69 6e 61 74 65 73 20 74 |rol elim|inates t|
|00001a80| 68 65 20 6e 65 65 64 20 | 74 6f 20 72 65 70 72 65 |he need |to repre|
|00001a90| 73 65 6e 74 20 42 4c 4f | 43 4b 20 61 6e 64 20 47 |sent BLO|CK and G|
|00001aa0| 4f 2c 20 61 6e 64 0a 6d | 61 6b 65 73 20 66 6c 6f |O, and.m|akes flo|
|00001ab0| 77 20 61 6e 61 6c 79 73 | 69 73 20 65 61 73 79 2e |w analys|is easy.|
|00001ac0| 20 20 54 68 65 20 66 75 | 6c 6c 20 43 6f 6d 6d 6f | The fu|ll Commo|
|00001ad0| 6e 20 4c 69 73 70 20 4c | 41 4d 42 44 41 20 69 73 |n Lisp L|AMBDA is|
|00001ae0| 20 69 6d 70 6c 65 6d 65 | 6e 74 65 64 20 77 69 74 | impleme|nted wit|
|00001af0| 68 20 61 0a 73 69 6d 70 | 6c 65 20 66 69 78 65 64 |h a.simp|le fixed|
|00001b00| 2d 61 72 67 20 6c 61 6d | 62 64 61 2c 20 77 68 69 |-arg lam|bda, whi|
|00001b10| 63 68 20 67 72 65 61 74 | 6c 79 20 73 69 6d 70 6c |ch great|ly simpl|
|00001b20| 69 66 69 65 73 20 6c 61 | 74 65 72 20 63 6f 64 65 |ifies la|ter code|
|00001b30| 2e 0a 20 20 20 20 20 20 | 0a 54 68 65 20 65 6c 69 |.. |.The eli|
|00001b40| 6d 69 6e 61 74 69 6f 6e | 20 6f 66 20 73 79 6e 74 |mination| of synt|
|00001b50| 61 63 74 69 63 20 69 6e | 66 6f 72 6d 61 74 69 6f |actic in|formatio|
|00001b60| 6e 20 65 6c 69 6d 69 6e | 61 74 65 73 20 74 68 65 |n elimin|ates the|
|00001b70| 20 6e 65 65 64 20 66 6f | 72 20 6d 6f 73 74 20 6f | need fo|r most o|
|00001b80| 66 20 74 68 65 0a 22 62 | 65 74 61 20 74 72 61 6e |f the."b|eta tran|
|00001b90| 73 66 6f 72 6d 61 74 69 | 6f 6e 22 20 6f 70 74 69 |sformati|on" opti|
|00001ba0| 6d 69 7a 61 74 69 6f 6e | 73 20 69 6e 20 52 61 62 |mization|s in Rab|
|00001bb0| 62 69 74 2e 20 20 54 68 | 65 72 65 20 61 72 65 20 |bit. Th|ere are |
|00001bc0| 6e 6f 20 70 72 6f 67 6e | 73 2c 20 6e 6f 0a 74 61 |no progn|s, no.ta|
|00001bd0| 67 62 6f 64 79 73 20 61 | 6e 64 20 6e 6f 20 72 65 |gbodys a|nd no re|
|00001be0| 74 75 72 6e 73 2e 20 20 | 54 68 65 72 65 20 61 72 |turns. |There ar|
|00001bf0| 65 20 6e 6f 20 22 63 6c | 6f 73 65 20 70 61 72 65 |e no "cl|ose pare|
|00001c00| 6e 73 22 20 77 68 69 63 | 68 20 67 65 74 20 69 6e |ns" whic|h get in|
|00001c10| 20 74 68 65 20 77 61 79 | 20 6f 66 0a 64 65 74 65 | the way| of.dete|
|00001c20| 72 6d 69 6e 69 6e 67 20 | 77 68 69 63 68 20 6e 6f |rmining |which no|
|00001c30| 64 65 20 72 65 63 65 69 | 76 65 73 20 61 20 67 69 |de recei|ves a gi|
|00001c40| 76 65 6e 20 76 61 6c 75 | 65 2e 0a 0a 49 6e 20 49 |ven valu|e...In I|
|00001c50| 43 52 2c 20 63 6f 6d 70 | 75 74 61 74 69 6f 6e 20 |CR, comp|utation |
|00001c60| 69 73 20 72 65 70 72 65 | 73 65 6e 74 65 64 20 62 |is repre|sented b|
|00001c70| 79 20 4e 6f 64 65 73 2e | 20 20 54 68 65 73 65 20 |y Nodes.| These |
|00001c80| 61 72 65 20 74 68 65 20 | 6e 6f 64 65 20 74 79 70 |are the |node typ|
|00001c90| 65 73 3a 0a 5c 62 65 67 | 69 6e 7b 64 65 73 63 72 |es:.\beg|in{descr|
|00001ca0| 69 70 74 69 6f 6e 7d 0a | 5c 69 74 65 6d 5b 69 66 |iption}.|\item[if|
|00001cb0| 5d 20 20 52 65 70 72 65 | 73 65 6e 74 73 20 61 6c |] Repre|sents al|
|00001cc0| 6c 20 63 6f 6e 64 69 74 | 69 6f 6e 61 6c 73 2e 0a |l condit|ionals..|
|00001cd0| 0a 5c 69 74 65 6d 5b 73 | 65 74 5d 20 52 65 70 72 |.\item[s|et] Repr|
|00001ce0| 65 73 65 6e 74 73 20 61 | 20 7b 5c 74 74 20 73 65 |esents a| {\tt se|
|00001cf0| 74 71 7d 2e 0a 0a 5c 69 | 74 65 6d 5b 72 65 66 5d |tq}...\i|tem[ref]|
|00001d00| 20 52 65 70 72 65 73 65 | 6e 74 73 20 61 20 63 6f | Represe|nts a co|
|00001d10| 6e 73 74 61 6e 74 20 6f | 72 20 76 61 72 69 61 62 |nstant o|r variab|
|00001d20| 6c 65 20 72 65 66 65 72 | 65 6e 63 65 2e 0a 0a 5c |le refer|ence...\|
|00001d30| 69 74 65 6d 5b 63 6f 6d | 62 69 6e 61 74 69 6f 6e |item[com|bination|
|00001d40| 5d 20 52 65 70 72 65 73 | 65 6e 74 73 20 61 20 6e |] Repres|ents a n|
|00001d50| 6f 72 6d 61 6c 20 66 75 | 6e 63 74 69 6f 6e 20 63 |ormal fu|nction c|
|00001d60| 61 6c 6c 2e 0a 0a 5c 69 | 74 65 6d 5b 4d 56 2d 63 |all...\i|tem[MV-c|
|00001d70| 6f 6d 62 69 6e 61 74 69 | 6f 6e 5d 20 52 65 70 72 |ombinati|on] Repr|
|00001d80| 65 73 65 6e 74 73 20 61 | 20 7b 5c 74 74 20 6d 75 |esents a| {\tt mu|
|00001d90| 6c 74 69 70 6c 65 2d 76 | 61 6c 75 65 2d 63 61 6c |ltiple-v|alue-cal|
|00001da0| 6c 7d 2e 20 20 54 68 69 | 73 20 69 73 20 75 73 65 |l}. Thi|s is use|
|00001db0| 64 20 74 6f 0a 69 6d 70 | 6c 65 6d 65 6e 74 20 61 |d to.imp|lement a|
|00001dc0| 6c 6c 20 6d 75 6c 74 69 | 70 6c 65 20 76 61 6c 75 |ll multi|ple valu|
|00001dd0| 65 20 72 65 63 65 69 76 | 69 6e 67 20 66 6f 72 6d |e receiv|ing form|
|00001de0| 73 20 65 78 63 65 70 74 | 20 66 6f 72 20 7b 5c 74 |s except| for {\t|
|00001df0| 74 0a 6d 75 6c 74 69 70 | 6c 65 2d 76 61 6c 75 65 |t.multip|le-value|
|00001e00| 2d 70 72 6f 67 31 7d 2c | 20 77 68 69 63 68 20 69 |-prog1},| which i|
|00001e10| 73 20 69 6d 70 6c 69 63 | 69 74 2e 0a 0a 5c 69 74 |s implic|it...\it|
|00001e20| 65 6d 5b 62 69 6e 64 5d | 0a 54 68 69 73 20 72 65 |em[bind]|.This re|
|00001e30| 70 72 65 73 65 6e 74 73 | 20 74 68 65 20 61 6c 6c |presents| the all|
|00001e40| 6f 63 61 74 69 6f 6e 20 | 61 6e 64 20 69 6e 69 74 |ocation |and init|
|00001e50| 69 61 6c 69 7a 61 74 69 | 6f 6e 20 6f 66 20 74 68 |ializati|on of th|
|00001e60| 65 20 76 61 72 69 61 62 | 6c 65 73 20 69 6e 0a 61 |e variab|les in.a|
|00001e70| 20 6c 61 6d 62 64 61 2e | 0a 0a 5c 69 74 65 6d 5b | lambda.|..\item[|
|00001e80| 72 65 74 75 72 6e 5d 0a | 54 68 69 73 20 63 6f 6c |return].|This col|
|00001e90| 6c 65 63 74 73 20 74 68 | 65 20 72 65 74 75 72 6e |lects th|e return|
|00001ea0| 20 76 61 6c 75 65 20 66 | 72 6f 6d 20 61 20 6c 61 | value f|rom a la|
|00001eb0| 6d 62 64 61 20 61 6e 64 | 20 72 65 70 72 65 73 65 |mbda and| represe|
|00001ec0| 6e 74 73 20 74 68 65 0a | 63 6f 6e 74 72 6f 6c 20 |nts the.|control |
|00001ed0| 74 72 61 6e 73 66 65 72 | 20 6f 6e 20 72 65 74 75 |transfer| on retu|
|00001ee0| 72 6e 2e 0a 0a 5c 69 74 | 65 6d 5b 65 6e 74 72 79 |rn...\it|em[entry|
|00001ef0| 5d 20 4d 61 72 6b 73 20 | 74 68 65 20 73 74 61 72 |] Marks |the star|
|00001f00| 74 20 6f 66 20 61 20 64 | 79 6e 61 6d 69 63 20 65 |t of a d|ynamic e|
|00001f10| 78 74 65 6e 74 20 74 68 | 61 74 20 63 61 6e 20 68 |xtent th|at can h|
|00001f20| 61 76 65 20 6e 6f 6e 2d | 6c 6f 63 61 6c 20 65 78 |ave non-|local ex|
|00001f30| 69 74 73 0a 74 6f 20 69 | 74 2e 20 20 44 79 6e 61 |its.to i|t. Dyna|
|00001f40| 6d 69 63 20 73 74 61 74 | 65 20 63 61 6e 20 62 65 |mic stat|e can be|
|00001f50| 20 73 61 76 65 64 20 61 | 74 20 74 68 69 73 20 70 | saved a|t this p|
|00001f60| 6f 69 6e 74 20 66 6f 72 | 20 72 65 73 74 6f 72 61 |oint for| restora|
|00001f70| 74 69 6f 6e 20 6f 6e 20 | 72 65 2d 65 6e 74 72 79 |tion on |re-entry|
|00001f80| 2e 0a 0a 5c 69 74 65 6d | 5b 65 78 69 74 5d 20 4d |...\item|[exit] M|
|00001f90| 61 72 6b 73 20 61 20 70 | 6f 74 65 6e 74 69 61 6c |arks a p|otential|
|00001fa0| 6c 79 20 6e 6f 6e 2d 6c | 6f 63 61 6c 20 65 78 69 |ly non-l|ocal exi|
|00001fb0| 74 2e 20 20 54 68 69 73 | 20 6e 6f 64 65 20 69 73 |t. This| node is|
|00001fc0| 20 69 6e 74 65 72 70 6f | 73 65 64 0a 62 65 74 77 | interpo|sed.betw|
|00001fd0| 65 65 6e 20 74 68 65 20 | 6e 6f 6e 2d 6c 6f 63 61 |een the |non-loca|
|00001fe0| 6c 20 75 73 65 73 20 6f | 66 20 61 20 63 6f 6e 74 |l uses o|f a cont|
|00001ff0| 69 6e 75 61 74 69 6f 6e | 20 61 6e 64 20 74 68 65 |inuation| and the|
|00002000| 20 7b 5c 74 74 20 64 65 | 73 74 7d 20 73 6f 20 74 | {\tt de|st} so t|
|00002010| 68 61 74 20 63 6f 64 65 | 20 74 6f 0a 64 6f 20 61 |hat code| to.do a|
|00002020| 20 6e 6f 6e 2d 6c 6f 63 | 61 6c 20 65 78 69 74 20 | non-loc|al exit |
|00002030| 63 61 6e 20 62 65 20 69 | 6e 73 65 72 74 65 64 20 |can be i|nserted |
|00002040| 69 66 20 6e 65 63 65 73 | 73 61 72 79 2e 0a 5c 65 |if neces|sary..\e|
|00002050| 6e 64 7b 64 65 73 63 72 | 69 70 74 69 6f 6e 7d 0a |nd{descr|iption}.|
|00002060| 0a 53 6f 6d 65 20 73 6c | 6f 74 73 20 61 72 65 20 |.Some sl|ots are |
|00002070| 73 68 61 72 65 64 20 62 | 65 74 77 65 65 6e 20 61 |shared b|etween a|
|00002080| 6c 6c 20 6e 6f 64 65 20 | 74 79 70 65 73 20 28 76 |ll node |types (v|
|00002090| 69 61 20 64 65 66 73 74 | 72 75 63 74 20 69 6e 68 |ia defst|ruct inh|
|000020a0| 65 72 69 74 61 6e 63 65 | 2e 29 20 20 54 68 69 73 |eritance|.) This|
|000020b0| 0a 69 6e 66 6f 72 6d 61 | 74 69 6f 6e 20 68 65 6c |.informa|tion hel|
|000020c0| 64 20 69 6e 20 63 6f 6d | 6d 6f 6e 20 62 65 74 77 |d in com|mon betw|
|000020d0| 65 65 6e 20 61 6c 6c 20 | 6e 6f 64 65 73 20 6f 66 |een all |nodes of|
|000020e0| 74 65 6e 20 6d 61 6b 65 | 73 20 69 74 20 70 6f 73 |ten make|s it pos|
|000020f0| 73 69 62 6c 65 20 74 6f | 20 61 76 6f 69 64 0a 73 |sible to| avoid.s|
|00002100| 70 65 63 69 61 6c 2d 63 | 61 73 69 6e 67 20 6e 6f |pecial-c|asing no|
|00002110| 64 65 73 20 6f 6e 20 74 | 68 65 20 62 61 73 69 73 |des on t|he basis|
|00002120| 20 6f 66 20 74 79 70 65 | 2e 20 20 54 68 69 73 20 | of type|. This |
|00002130| 73 68 61 72 65 64 20 69 | 6e 66 6f 72 6d 61 74 69 |shared i|nformati|
|00002140| 6f 6e 20 69 73 0a 70 72 | 69 6d 61 72 69 6c 79 20 |on is.pr|imarily |
|00002150| 63 6f 6e 63 65 72 6e 65 | 64 20 77 69 74 68 20 74 |concerne|d with t|
|00002160| 68 65 20 6f 72 64 65 72 | 20 6f 66 20 65 76 61 6c |he order| of eval|
|00002170| 75 61 74 69 6f 6e 20 61 | 6e 64 20 64 65 73 74 69 |uation a|nd desti|
|00002180| 6e 61 74 69 6f 6e 73 20 | 61 6e 64 0a 70 72 6f 70 |nations |and.prop|
|00002190| 65 72 74 69 65 73 20 6f | 66 20 72 65 73 75 6c 74 |erties o|f result|
|000021a0| 73 2e 20 20 54 68 69 73 | 20 63 6f 6e 74 72 6f 6c |s. This| control|
|000021b0| 20 61 6e 64 20 76 61 6c | 75 65 20 66 6c 6f 77 20 | and val|ue flow |
|000021c0| 69 73 20 69 6e 64 69 63 | 61 74 65 64 20 69 6e 20 |is indic|ated in |
|000021d0| 74 68 65 20 6e 6f 64 65 | 0a 70 72 69 6d 61 72 69 |the node|.primari|
|000021e0| 6c 79 20 62 79 20 70 6f | 69 6e 74 69 6e 67 20 74 |ly by po|inting t|
|000021f0| 6f 20 63 6f 6e 74 69 6e | 75 61 74 69 6f 6e 73 2e |o contin|uations.|
|00002200| 0a 0a 54 68 65 20 7b 5c | 74 74 20 63 6f 6e 74 69 |..The {\|tt conti|
|00002210| 6e 75 61 74 69 6f 6e 7d | 20 73 74 72 75 63 74 75 |nuation}| structu|
|00002220| 72 65 20 72 65 70 72 65 | 73 65 6e 74 73 20 69 6e |re repre|sents in|
|00002230| 66 6f 72 6d 61 74 69 6f | 6e 20 73 75 66 66 69 63 |formatio|n suffic|
|00002240| 69 65 6e 74 6c 79 20 72 | 65 6c 61 74 65 64 0a 74 |iently r|elated.t|
|00002250| 6f 20 74 68 65 20 6e 6f | 72 6d 61 6c 20 6e 6f 74 |o the no|rmal not|
|00002260| 69 6f 6e 20 6f 66 20 61 | 20 63 6f 6e 74 69 6e 75 |ion of a| continu|
|00002270| 61 74 69 6f 6e 20 74 68 | 61 74 20 6e 61 6d 69 6e |ation th|at namin|
|00002280| 67 20 69 74 20 73 6f 20 | 73 65 65 6d 73 20 73 65 |g it so |seems se|
|00002290| 6e 73 69 62 6c 65 2e 0a | 42 61 73 69 63 61 6c 6c |nsible..|Basicall|
|000022a0| 79 2c 20 61 20 63 6f 6e | 74 69 6e 75 61 74 69 6f |y, a con|tinuatio|
|000022b0| 6e 20 72 65 70 72 65 73 | 65 6e 74 73 20 61 20 70 |n repres|ents a p|
|000022c0| 6c 61 63 65 20 69 6e 20 | 74 68 65 20 63 6f 64 65 |lace in |the code|
|000022d0| 2c 20 6f 72 20 61 6c 74 | 65 72 6e 61 74 69 76 65 |, or alt|ernative|
|000022e0| 6c 79 20 74 68 65 0a 64 | 65 73 74 69 6e 61 74 69 |ly the.d|estinati|
|000022f0| 6f 6e 20 6f 66 20 61 6e | 20 65 78 70 72 65 73 73 |on of an| express|
|00002300| 69 6f 6e 20 72 65 73 75 | 6c 74 20 61 6e 64 20 61 |ion resu|lt and a|
|00002310| 20 74 72 61 6e 73 66 65 | 72 20 6f 66 20 63 6f 6e | transfe|r of con|
|00002320| 74 72 6f 6c 2e 20 20 54 | 68 65 73 65 20 74 77 6f |trol. T|hese two|
|00002330| 0a 6e 6f 74 69 6f 6e 73 | 20 61 72 65 20 62 6f 75 |.notions| are bou|
|00002340| 6e 64 20 74 6f 67 65 74 | 68 65 72 20 66 6f 72 20 |nd toget|her for |
|00002350| 74 68 65 20 73 61 6d 65 | 20 72 65 61 73 6f 6e 73 |the same| reasons|
|00002360| 20 74 68 61 74 20 74 68 | 65 79 20 61 72 65 20 72 | that th|ey are r|
|00002370| 65 6c 61 74 65 64 20 69 | 6e 20 74 68 65 0a 73 74 |elated i|n the.st|
|00002380| 61 6e 64 61 72 64 20 66 | 75 6e 63 74 69 6f 6e 61 |andard f|unctiona|
|00002390| 6c 20 63 6f 6e 74 69 6e | 75 61 74 69 6f 6e 20 69 |l contin|uation i|
|000023a0| 6e 74 65 72 70 72 65 74 | 61 74 69 6f 6e 2e 0a 0a |nterpret|ation...|
|000023b0| 41 20 63 6f 6e 74 69 6e | 75 61 74 69 6f 6e 20 6d |A contin|uation m|
|000023c0| 61 79 20 62 65 20 64 65 | 70 72 69 76 65 64 20 6f |ay be de|prived o|
|000023d0| 66 20 65 69 74 68 65 72 | 20 6f 72 20 62 6f 74 68 |f either| or both|
|000023e0| 20 6f 66 20 69 74 73 20 | 76 61 6c 75 65 20 6f 72 | of its |value or|
|000023f0| 20 63 6f 6e 74 72 6f 6c | 0a 73 69 67 6e 69 66 69 | control|.signifi|
|00002400| 63 61 6e 63 65 2e 20 20 | 49 66 20 74 68 65 20 76 |cance. |If the v|
|00002410| 61 6c 75 65 20 6f 66 20 | 61 20 63 6f 6e 74 69 6e |alue of |a contin|
|00002420| 75 61 74 69 6f 6e 20 69 | 73 20 75 6e 75 73 65 64 |uation i|s unused|
|00002430| 20 64 75 65 20 74 6f 20 | 65 76 61 6c 75 61 74 69 | due to |evaluati|
|00002440| 6f 6e 20 66 6f 72 0a 65 | 66 66 65 63 74 2c 20 74 |on for.e|ffect, t|
|00002450| 68 65 6e 20 74 68 65 20 | 63 6f 6e 74 69 6e 75 61 |hen the |continua|
|00002460| 74 69 6f 6e 20 77 69 6c | 6c 20 68 61 76 65 20 61 |tion wil|l have a|
|00002470| 20 6e 75 6c 6c 20 7b 5c | 74 74 20 64 65 73 74 7d | null {\|tt dest}|
|00002480| 2e 20 20 49 66 20 74 68 | 65 20 7b 5c 74 74 20 6e |. If th|e {\tt n|
|00002490| 65 78 74 7d 0a 6e 6f 64 | 65 20 66 6f 72 20 61 20 |ext}.nod|e for a |
|000024a0| 63 6f 6e 74 69 6e 75 61 | 74 69 6f 6e 20 69 73 20 |continua|tion is |
|000024b0| 64 65 6c 65 74 65 64 20 | 62 79 20 73 6f 6d 65 20 |deleted |by some |
|000024c0| 6f 70 74 69 6d 69 7a 61 | 74 69 6f 6e 2c 20 74 68 |optimiza|tion, th|
|000024d0| 65 6e 20 7b 5c 74 74 20 | 6e 65 78 74 7d 20 77 69 |en {\tt |next} wi|
|000024e0| 6c 6c 0a 62 65 20 7b 5c | 74 74 20 3a 6e 6f 6e 65 |ll.be {\|tt :none|
|000024f0| 7d 2e 0a 0a 20 20 5b 5c | 23 5c 23 5c 23 20 43 6f |}... [\|#\#\# Co|
|00002500| 6e 74 69 6e 75 61 74 69 | 6f 6e 20 6b 69 6e 64 73 |ntinuati|on kinds|
|00002510| 2e 2e 2e 5d 0a 0a 54 68 | 65 20 7b 5c 74 74 20 62 |...]..Th|e {\tt b|
|00002520| 6c 6f 63 6b 7d 20 73 74 | 72 75 63 74 75 72 65 20 |lock} st|ructure |
|00002530| 72 65 70 72 65 73 65 6e | 74 73 20 61 20 62 61 73 |represen|ts a bas|
|00002540| 69 63 20 62 6c 6f 63 6b | 2c 20 69 6e 20 74 68 65 |ic block|, in the|
|00002550| 20 74 68 65 20 6e 6f 72 | 6d 61 6c 20 73 65 6e 73 | the nor|mal sens|
|00002560| 65 2e 0a 43 6f 6e 74 72 | 6f 6c 20 74 72 61 6e 73 |e..Contr|ol trans|
|00002570| 66 65 72 73 20 6f 74 68 | 65 72 20 74 68 61 6e 20 |fers oth|er than |
|00002580| 73 69 6d 70 6c 65 20 73 | 65 71 75 65 6e 63 69 6e |simple s|equencin|
|00002590| 67 20 61 72 65 20 72 65 | 70 72 65 73 65 6e 74 65 |g are re|presente|
|000025a0| 64 20 62 79 20 69 6e 66 | 6f 72 6d 61 74 69 6f 6e |d by inf|ormation|
|000025b0| 0a 69 6e 20 74 68 65 20 | 62 6c 6f 63 6b 20 73 74 |.in the |block st|
|000025c0| 72 75 63 74 75 72 65 2e | 20 20 54 68 65 20 63 6f |ructure.| The co|
|000025d0| 6e 74 69 6e 75 61 74 69 | 6f 6e 20 66 6f 72 20 74 |ntinuati|on for t|
|000025e0| 68 65 20 6c 61 73 74 20 | 6e 6f 64 65 20 69 6e 20 |he last |node in |
|000025f0| 61 20 62 6c 6f 63 6b 0a | 72 65 70 72 65 73 65 6e |a block.|represen|
|00002600| 74 73 20 6f 6e 6c 79 20 | 74 68 65 20 64 65 73 74 |ts only |the dest|
|00002610| 69 6e 61 74 69 6f 6e 20 | 66 6f 72 20 74 68 65 20 |ination |for the |
|00002620| 72 65 73 75 6c 74 2e 0a | 0a 49 74 20 69 73 20 76 |result..|.It is v|
|00002630| 65 72 79 20 64 69 66 66 | 69 63 75 6c 74 20 74 6f |ery diff|icult to|
|00002640| 20 72 65 63 6f 6e 73 74 | 72 75 63 74 20 61 6e 79 | reconst|ruct any|
|00002650| 74 68 69 6e 67 20 72 65 | 73 65 6d 62 6c 69 6e 67 |thing re|sembling|
|00002660| 20 74 68 65 20 6f 72 69 | 67 69 6e 61 6c 20 73 6f | the ori|ginal so|
|00002670| 75 72 63 65 0a 66 72 6f | 6d 20 49 43 52 2c 20 73 |urce.fro|m ICR, s|
|00002680| 6f 20 77 65 20 72 65 63 | 6f 72 64 20 74 68 65 20 |o we rec|ord the |
|00002690| 6f 72 69 67 69 6e 61 6c | 20 73 6f 75 72 63 65 20 |original| source |
|000026a0| 66 6f 72 6d 20 69 6e 20 | 65 61 63 68 20 6e 6f 64 |form in |each nod|
|000026b0| 65 2e 20 20 54 68 65 20 | 6c 6f 63 61 74 69 6f 6e |e. The |location|
|000026c0| 20 6f 66 0a 74 68 65 20 | 73 6f 75 72 63 65 20 66 | of.the |source f|
|000026d0| 6f 72 6d 20 77 69 74 68 | 69 6e 20 74 68 65 20 69 |orm with|in the i|
|000026e0| 6e 70 75 74 20 69 73 20 | 61 6c 73 6f 20 72 65 63 |nput is |also rec|
|000026f0| 6f 72 64 65 64 2c 20 61 | 6c 6c 6f 77 69 6e 67 20 |orded, a|llowing |
|00002700| 66 6f 72 20 69 6e 74 65 | 72 66 61 63 65 73 20 73 |for inte|rfaces s|
|00002710| 75 63 68 0a 61 73 20 22 | 45 64 69 74 20 43 6f 6d |uch.as "|Edit Com|
|00002720| 70 69 6c 65 72 20 57 61 | 72 6e 69 6e 67 73 22 2e |piler Wa|rnings".|
|00002730| 20 20 53 65 65 20 73 65 | 63 74 69 6f 6e 20 5c 72 | See se|ction \r|
|00002740| 65 66 7b 73 6f 75 72 63 | 65 2d 70 61 74 68 73 7d |ef{sourc|e-paths}|
|00002750| 2e 0a 0a 46 6f 72 6d 73 | 20 73 75 63 68 20 61 73 |...Forms| such as|
|00002760| 20 73 70 65 63 69 61 6c | 2d 62 69 6e 64 20 61 6e | special|-bind an|
|00002770| 64 20 63 61 74 63 68 20 | 6e 65 65 64 20 74 6f 20 |d catch |need to |
|00002780| 68 61 76 65 20 63 6c 65 | 61 6e 75 70 20 63 6f 64 |have cle|anup cod|
|00002790| 65 20 65 78 65 63 75 74 | 65 64 20 61 74 20 61 6c |e execut|ed at al|
|000027a0| 6c 0a 65 78 69 74 20 70 | 6f 69 6e 74 73 20 66 72 |l.exit p|oints fr|
|000027b0| 6f 6d 20 74 68 65 20 66 | 6f 72 6d 2e 20 20 57 65 |om the f|orm. We|
|000027c0| 20 72 65 70 72 65 73 65 | 6e 74 20 74 68 69 73 20 | represe|nt this |
|000027d0| 63 6f 6e 73 74 72 61 69 | 6e 74 20 69 6e 20 49 43 |constrai|nt in IC|
|000027e0| 52 20 62 79 20 61 6e 6e | 6f 74 61 74 69 6e 67 0a |R by ann|otating.|
|000027f0| 74 68 65 20 63 6f 64 65 | 20 73 79 6e 74 61 63 74 |the code| syntact|
|00002800| 69 63 61 6c 6c 79 20 77 | 69 74 68 69 6e 20 74 68 |ically w|ithin th|
|00002810| 65 20 66 6f 72 6d 20 77 | 69 74 68 20 61 20 43 6c |e form w|ith a Cl|
|00002820| 65 61 6e 75 70 20 73 74 | 72 75 63 74 75 72 65 20 |eanup st|ructure |
|00002830| 64 65 73 63 72 69 62 69 | 6e 67 20 77 68 61 74 0a |describi|ng what.|
|00002840| 6e 65 65 64 73 20 74 6f | 20 62 65 20 63 6c 65 61 |needs to| be clea|
|00002850| 6e 65 64 20 75 70 2e 20 | 20 45 6e 76 69 72 6f 6e |ned up. | Environ|
|00002860| 6d 65 6e 74 20 61 6e 61 | 6c 79 73 69 73 20 64 65 |ment ana|lysis de|
|00002870| 74 65 72 6d 69 6e 65 73 | 20 74 68 65 20 63 6c 65 |termines| the cle|
|00002880| 61 6e 75 70 20 6c 6f 63 | 61 74 69 6f 6e 73 0a 62 |anup loc|ations.b|
|00002890| 79 20 77 61 74 63 68 69 | 6e 67 20 66 6f 72 20 61 |y watchi|ng for a|
|000028a0| 20 63 68 61 6e 67 65 20 | 69 6e 20 74 68 65 20 63 | change |in the c|
|000028b0| 6c 65 61 6e 75 70 20 62 | 65 74 77 65 65 6e 20 74 |leanup b|etween t|
|000028c0| 77 6f 20 63 6f 6e 74 69 | 6e 75 61 74 69 6f 6e 73 |wo conti|nuations|
|000028d0| 2e 20 20 57 65 20 63 61 | 6e 27 74 0a 65 6d 69 74 |. We ca|n't.emit|
|000028e0| 20 63 6c 65 61 6e 75 70 | 20 63 6f 64 65 20 64 75 | cleanup| code du|
|000028f0| 72 69 6e 67 20 49 43 52 | 20 63 6f 6e 76 65 72 73 |ring ICR| convers|
|00002900| 69 6f 6e 2c 20 73 69 6e | 63 65 20 77 65 20 64 6f |ion, sin|ce we do|
|00002910| 6e 27 74 20 6b 6e 6f 77 | 20 77 68 69 63 68 20 65 |n't know| which e|
|00002920| 78 69 74 73 20 77 69 6c | 6c 0a 62 65 20 6c 6f 63 |xits wil|l.be loc|
|00002930| 61 6c 20 75 6e 74 69 6c | 20 61 66 74 65 72 20 49 |al until| after I|
|00002940| 43 52 20 6f 70 74 69 6d | 69 7a 61 74 69 6f 6e 73 |CR optim|izations|
|00002950| 20 61 72 65 20 64 6f 6e | 65 2e 0a 0a 53 70 65 63 | are don|e...Spec|
|00002960| 69 61 6c 20 62 69 6e 64 | 69 6e 67 20 69 73 20 72 |ial bind|ing is r|
|00002970| 65 70 72 65 73 65 6e 74 | 65 64 20 62 79 20 61 20 |epresent|ed by a |
|00002980| 63 61 6c 6c 20 74 6f 20 | 74 68 65 20 66 75 6e 6e |call to |the funn|
|00002990| 79 20 66 75 6e 63 74 69 | 6f 6e 20 25 53 70 65 63 |y functi|on %Spec|
|000029a0| 69 61 6c 2d 42 69 6e 64 | 2e 0a 54 68 65 20 66 69 |ial-Bind|..The fi|
|000029b0| 72 73 74 20 61 72 67 75 | 6d 65 6e 74 20 69 73 20 |rst argu|ment is |
|000029c0| 74 68 65 20 47 6c 6f 62 | 61 6c 2d 56 61 72 20 73 |the Glob|al-Var s|
|000029d0| 74 72 75 63 74 75 72 65 | 20 66 6f 72 20 74 68 65 |tructure| for the|
|000029e0| 20 76 61 72 69 61 62 6c | 65 20 62 6f 75 6e 64 20 | variabl|e bound |
|000029f0| 61 6e 64 20 74 68 65 0a | 73 65 63 6f 6e 64 20 61 |and the.|second a|
|00002a00| 72 67 75 6d 65 6e 74 20 | 69 73 20 74 68 65 20 76 |rgument |is the v|
|00002a10| 61 6c 75 65 20 74 6f 20 | 62 69 6e 64 20 69 74 20 |alue to |bind it |
|00002a20| 74 6f 2e 0a 0a 53 6f 6d | 65 20 73 75 62 70 72 69 |to...Som|e subpri|
|00002a30| 6d 69 74 69 76 65 73 20 | 61 72 65 20 69 6d 70 6c |mitives |are impl|
|00002a40| 65 6d 65 6e 74 65 64 20 | 75 73 69 6e 67 20 61 20 |emented |using a |
|00002a50| 6d 61 63 72 6f 2d 6c 69 | 6b 65 20 6d 65 63 68 61 |macro-li|ke mecha|
|00002a60| 6e 69 73 6d 20 66 6f 72 | 20 74 72 61 6e 73 6c 61 |nism for| transla|
|00002a70| 74 69 6e 67 0a 25 50 52 | 49 4d 49 54 49 56 45 20 |ting.%PR|IMITIVE |
|00002a80| 66 6f 72 6d 73 20 69 6e | 74 6f 20 61 72 62 69 74 |forms in|to arbit|
|00002a90| 72 61 72 79 20 6c 69 73 | 70 20 63 6f 64 65 2e 20 |rary lis|p code. |
|00002aa0| 20 53 75 62 70 72 69 6d | 69 74 69 76 65 73 20 73 | Subprim|itives s|
|00002ab0| 70 65 63 69 61 6c 2d 63 | 61 73 65 64 20 62 79 20 |pecial-c|ased by |
|00002ac0| 56 4d 52 0a 63 6f 6e 76 | 65 72 73 69 6f 6e 20 61 |VMR.conv|ersion a|
|00002ad0| 72 65 20 72 65 70 72 65 | 73 65 6e 74 65 64 20 62 |re repre|sented b|
|00002ae0| 79 20 61 20 63 61 6c 6c | 20 74 6f 20 74 68 65 20 |y a call| to the |
|00002af0| 66 75 6e 6e 79 20 66 75 | 6e 63 74 69 6f 6e 20 25 |funny fu|nction %|
|00002b00| 25 50 72 69 6d 69 74 69 | 76 65 2e 20 20 54 68 65 |%Primiti|ve. The|
|00002b10| 0a 63 6f 72 72 65 73 70 | 6f 6e 64 69 6e 67 20 54 |.corresp|onding T|
|00002b20| 65 6d 70 6c 61 74 65 20 | 73 74 72 75 63 74 75 72 |emplate |structur|
|00002b30| 65 20 69 73 20 70 61 73 | 73 65 64 20 61 73 20 74 |e is pas|sed as t|
|00002b40| 68 65 20 66 69 72 73 74 | 20 61 72 67 75 6d 65 6e |he first| argumen|
|00002b50| 74 2e 0a 0a 57 65 20 63 | 68 65 63 6b 20 67 6c 6f |t...We c|heck glo|
|00002b60| 62 61 6c 20 66 75 6e 63 | 74 69 6f 6e 20 63 61 6c |bal func|tion cal|
|00002b70| 6c 73 20 66 6f 72 20 73 | 79 6e 74 61 63 74 69 63 |ls for s|yntactic|
|00002b80| 20 6c 65 67 61 6c 69 74 | 79 20 77 69 74 68 20 72 | legalit|y with r|
|00002b90| 65 73 70 65 63 74 20 74 | 6f 20 61 6e 79 0a 64 65 |espect t|o any.de|
|00002ba0| 66 69 6e 65 64 20 66 75 | 6e 63 74 69 6f 6e 20 74 |fined fu|nction t|
|00002bb0| 79 70 65 20 66 75 6e 63 | 74 69 6f 6e 2e 20 20 49 |ype func|tion. I|
|00002bc0| 66 20 74 68 65 20 63 61 | 6c 6c 20 69 73 20 69 6c |f the ca|ll is il|
|00002bd0| 6c 65 67 61 6c 20 6f 72 | 20 77 65 20 61 72 65 20 |legal or| we are |
|00002be0| 75 6e 61 62 6c 65 20 74 | 6f 0a 74 65 6c 6c 20 69 |unable t|o.tell i|
|00002bf0| 66 20 69 74 20 69 73 20 | 6c 65 67 61 6c 20 64 75 |f it is |legal du|
|00002c00| 65 20 74 6f 20 6e 6f 6e | 2d 63 6f 6e 73 74 61 6e |e to non|-constan|
|00002c10| 74 20 6b 65 79 77 6f 72 | 64 73 2c 20 74 68 65 6e |t keywor|ds, then|
|00002c20| 20 77 65 20 67 69 76 65 | 20 61 20 77 61 72 6e 69 | we give| a warni|
|00002c30| 6e 67 20 61 6e 64 0a 6d | 61 72 6b 20 74 68 65 20 |ng and.m|ark the |
|00002c40| 66 75 6e 63 74 69 6f 6e | 20 72 65 66 65 72 65 6e |function| referen|
|00002c50| 63 65 20 61 73 20 3a 6e | 6f 74 69 6e 6c 69 6e 65 |ce as :n|otinline|
|00002c60| 20 74 6f 20 66 6f 72 63 | 65 20 61 20 66 75 6c 6c | to forc|e a full|
|00002c70| 20 63 61 6c 6c 20 61 6e | 64 20 63 61 75 73 65 0a | call an|d cause.|
|00002c80| 73 75 62 73 65 71 75 65 | 6e 74 20 70 68 61 73 65 |subseque|nt phase|
|00002c90| 73 20 74 6f 20 69 67 6e | 6f 72 65 20 74 68 65 20 |s to ign|ore the |
|00002ca0| 63 61 6c 6c 2e 20 20 49 | 66 20 74 68 65 20 63 61 |call. I|f the ca|
|00002cb0| 6c 6c 20 69 73 20 6c 65 | 67 61 6c 20 61 6e 64 20 |ll is le|gal and |
|00002cc0| 69 73 20 74 6f 20 61 20 | 6b 6e 6f 77 6e 0a 66 75 |is to a |known.fu|
|00002cd0| 6e 63 74 69 6f 6e 2c 20 | 74 68 65 6e 20 77 65 20 |nction, |then we |
|00002ce0| 61 6e 6e 6f 74 61 74 65 | 20 74 68 65 20 43 6f 6d |annotate| the Com|
|00002cf0| 62 69 6e 61 74 69 6f 6e | 20 6e 6f 64 65 20 77 69 |bination| node wi|
|00002d00| 74 68 20 74 68 65 20 46 | 75 6e 63 74 69 6f 6e 2d |th the F|unction-|
|00002d10| 49 6e 66 6f 0a 73 74 72 | 75 63 74 75 72 65 20 74 |Info.str|ucture t|
|00002d20| 68 61 74 20 63 6f 6e 74 | 61 69 6e 73 20 74 68 65 |hat cont|ains the|
|00002d30| 20 63 6f 6d 70 69 6c 65 | 72 20 69 6e 66 6f 72 6d | compile|r inform|
|00002d40| 61 74 69 6f 6e 20 66 6f | 72 20 74 68 65 20 66 75 |ation fo|r the fu|
|00002d50| 6e 63 74 69 6f 6e 2e 0a | 0a 0c 0a 5c 73 65 63 74 |nction..|...\sect|
|00002d60| 69 6f 6e 7b 54 61 69 6c | 20 73 65 74 73 7d 0a 5c |ion{Tail| sets}.\|
|00002d70| 23 7c 0a 50 72 6f 62 61 | 62 6c 79 20 77 61 6e 74 |#|.Proba|bly want|
|00002d80| 20 74 6f 20 68 61 76 65 | 20 61 20 47 54 4e 2d 6c | to have| a GTN-l|
|00002d90| 69 6b 65 20 66 75 6e 63 | 74 69 6f 6e 20 72 65 73 |ike func|tion res|
|00002da0| 75 6c 74 20 65 71 75 69 | 76 61 6c 65 6e 63 65 20 |ult equi|valence |
|00002db0| 63 6c 61 73 73 20 6d 65 | 63 68 61 6e 69 73 6d 0a |class me|chanism.|
|00002dc0| 66 6f 72 20 49 43 52 20 | 74 79 70 65 20 69 6e 66 |for ICR |type inf|
|00002dd0| 65 72 65 6e 63 65 2e 20 | 20 54 68 69 73 20 77 6f |erence. | This wo|
|00002de0| 75 6c 64 20 62 65 20 6c | 69 6b 65 20 74 68 65 20 |uld be l|ike the |
|00002df0| 72 65 74 75 72 6e 20 76 | 61 6c 75 65 20 70 72 6f |return v|alue pro|
|00002e00| 70 61 67 61 74 69 6f 6e | 20 62 65 69 6e 67 0a 64 |pagation| being.d|
|00002e10| 6f 6e 65 20 62 79 20 50 | 72 6f 70 61 67 61 74 65 |one by P|ropagate|
|00002e20| 2d 46 72 6f 6d 2d 43 61 | 6c 6c 73 2c 20 62 75 74 |-From-Ca|lls, but|
|00002e30| 20 6d 6f 72 65 20 70 6f | 77 65 72 66 75 6c 2c 20 | more po|werful, |
|00002e40| 6c 65 73 73 20 68 61 63 | 6b 69 73 68 2c 20 61 6e |less hac|kish, an|
|00002e50| 64 20 6b 6e 6f 77 6e 20 | 74 6f 0a 74 65 72 6d 69 |d known |to.termi|
|00002e60| 6e 61 74 65 2e 20 20 54 | 68 65 20 49 43 52 20 65 |nate. T|he ICR e|
|00002e70| 71 75 69 76 61 6c 65 6e | 63 65 20 63 6c 61 73 73 |quivalen|ce class|
|00002e80| 65 73 20 63 6f 75 6c 64 | 20 70 72 6f 62 61 62 6c |es could| probabl|
|00002e90| 79 20 62 65 20 75 73 65 | 64 20 62 79 20 47 54 4e |y be use|d by GTN|
|00002ea0| 2c 20 61 73 20 77 65 6c | 6c 2e 0a 0a 57 68 61 74 |, as wel|l...What|
|00002eb0| 20 77 65 20 64 6f 20 69 | 73 20 68 61 76 65 20 6c | we do i|s have l|
|00002ec0| 6f 63 61 6c 20 63 61 6c | 6c 20 61 6e 61 6c 79 73 |ocal cal|l analys|
|00002ed0| 69 73 20 65 61 67 65 72 | 6c 79 20 6d 61 69 6e 74 |is eager|ly maint|
|00002ee0| 61 69 6e 20 74 68 65 20 | 65 71 75 69 76 61 6c 65 |ain the |equivale|
|00002ef0| 6e 63 65 20 63 6c 61 73 | 73 65 73 0a 6f 66 20 66 |nce clas|ses.of f|
|00002f00| 75 6e 63 74 69 6f 6e 73 | 20 74 68 61 74 20 72 65 |unctions| that re|
|00002f10| 74 75 72 6e 20 74 68 65 | 20 73 61 6d 65 20 77 61 |turn the| same wa|
|00002f20| 79 20 62 79 20 61 6e 6e | 6f 74 61 74 69 6e 67 20 |y by ann|otating |
|00002f30| 66 75 6e 63 74 69 6f 6e | 73 20 77 69 74 68 20 61 |function|s with a|
|00002f40| 20 54 61 69 6c 2d 49 6e | 66 6f 0a 73 74 72 75 63 | Tail-In|fo.struc|
|00002f50| 74 75 72 65 20 73 68 61 | 72 65 64 20 62 65 74 77 |ture sha|red betw|
|00002f60| 65 65 6e 20 61 6c 6c 20 | 66 75 6e 63 74 69 6f 6e |een all |function|
|00002f70| 73 20 77 68 6f 73 65 20 | 76 61 6c 75 65 20 63 6f |s whose |value co|
|00002f80| 75 6c 64 20 62 65 20 74 | 68 65 20 76 61 6c 75 65 |uld be t|he value|
|00002f90| 20 6f 66 20 74 68 69 73 | 0a 66 75 6e 63 74 69 6f | of this|.functio|
|00002fa0| 6e 2e 20 20 57 65 20 64 | 6f 6e 27 74 20 72 65 71 |n. We d|on't req|
|00002fb0| 75 69 72 65 20 74 68 61 | 74 20 74 68 65 20 63 61 |uire tha|t the ca|
|00002fc0| 6c 6c 73 20 61 63 74 75 | 61 6c 6c 79 20 62 65 20 |lls actu|ally be |
|00002fd0| 74 61 69 6c 2d 72 65 63 | 75 72 73 69 76 65 2c 20 |tail-rec|ursive, |
|00002fe0| 6f 6e 6c 79 0a 74 68 61 | 74 20 74 68 65 20 63 61 |only.tha|t the ca|
|00002ff0| 6c 6c 20 64 65 6c 69 76 | 65 72 20 69 74 73 20 76 |ll deliv|er its v|
|00003000| 61 6c 75 65 20 74 6f 20 | 74 68 65 20 72 65 73 75 |alue to |the resu|
|00003010| 6c 74 20 63 6f 6e 74 69 | 6e 75 61 74 69 6f 6e 2e |lt conti|nuation.|
|00003020| 20 20 5b 5c 23 5c 23 5c | 23 20 41 63 74 75 61 6c | [\#\#\|# Actual|
|00003030| 6c 79 0a 6e 6f 77 20 64 | 6f 6e 65 20 62 79 20 49 |ly.now d|one by I|
|00003040| 43 52 2d 4f 50 54 49 4d | 49 5a 45 2d 52 45 54 55 |CR-OPTIM|IZE-RETU|
|00003050| 52 4e 2c 20 77 68 69 63 | 68 20 69 73 20 63 75 72 |RN, whic|h is cur|
|00003060| 72 65 6e 74 6c 79 20 6d | 61 6b 69 6e 67 20 49 43 |rently m|aking IC|
|00003070| 52 20 6f 70 74 69 6d 69 | 7a 65 0a 6d 61 6e 64 61 |R optimi|ze.manda|
|00003080| 74 6f 72 79 2e 5d 0a 0a | 57 65 20 63 61 6e 20 74 |tory.]..|We can t|
|00003090| 68 65 6e 20 75 73 65 20 | 74 68 65 20 54 61 69 6c |hen use |the Tail|
|000030a0| 2d 53 65 74 20 64 75 72 | 69 6e 67 20 49 43 52 20 |-Set dur|ing ICR |
|000030b0| 74 79 70 65 20 69 6e 66 | 65 72 65 6e 63 65 2e 20 |type inf|erence. |
|000030c0| 20 49 74 20 77 6f 75 6c | 64 20 68 61 76 65 20 61 | It woul|d have a|
|000030d0| 20 74 79 70 65 0a 74 68 | 61 74 20 69 73 20 74 68 | type.th|at is th|
|000030e0| 65 20 75 6e 69 6f 6e 20 | 61 63 72 6f 73 73 20 61 |e union |across a|
|000030f0| 6c 6c 20 65 71 75 69 76 | 61 6c 65 6e 74 20 66 75 |ll equiv|alent fu|
|00003100| 6e 63 74 69 6f 6e 73 20 | 6f 66 20 74 68 65 20 74 |nctions |of the t|
|00003110| 79 70 65 73 20 6f 66 20 | 61 6c 6c 20 74 68 65 20 |ypes of |all the |
|00003120| 75 73 65 73 0a 6f 74 68 | 65 72 20 74 68 61 6e 20 |uses.oth|er than |
|00003130| 69 6e 20 6c 6f 63 61 6c | 20 63 61 6c 6c 73 2e 20 |in local| calls. |
|00003140| 20 54 68 69 73 20 74 79 | 70 65 20 77 6f 75 6c 64 | This ty|pe would|
|00003150| 20 62 65 20 72 65 63 6f | 6d 70 75 74 65 64 20 64 | be reco|mputed d|
|00003160| 75 72 69 6e 67 20 6f 70 | 74 69 6d 69 7a 61 74 69 |uring op|timizati|
|00003170| 6f 6e 0a 6f 66 20 72 65 | 74 75 72 6e 20 6e 6f 64 |on.of re|turn nod|
|00003180| 65 73 2e 20 20 57 68 65 | 6e 20 74 68 65 20 74 79 |es. Whe|n the ty|
|00003190| 70 65 20 63 68 61 6e 67 | 65 73 2c 20 77 65 20 77 |pe chang|es, we w|
|000031a0| 6f 75 6c 64 20 70 72 6f | 70 61 67 61 74 65 20 69 |ould pro|pagate i|
|000031b0| 74 20 74 6f 20 61 6c 6c | 20 63 61 6c 6c 73 20 74 |t to all| calls t|
|000031c0| 6f 0a 61 6e 79 20 6f 66 | 20 74 68 65 20 65 71 75 |o.any of| the equ|
|000031d0| 69 76 61 6c 65 6e 74 20 | 66 75 6e 63 74 69 6f 6e |ivalent |function|
|000031e0| 73 2e 20 20 48 6f 77 20 | 64 6f 20 77 65 20 6b 6e |s. How |do we kn|
|000031f0| 6f 77 20 77 68 65 6e 20 | 61 6e 64 20 68 6f 77 20 |ow when |and how |
|00003200| 74 6f 20 72 65 63 6f 6d | 70 75 74 65 20 74 68 65 |to recom|pute the|
|00003210| 0a 74 79 70 65 20 66 6f | 72 20 61 20 74 61 69 6c |.type fo|r a tail|
|00003220| 2d 73 65 74 3f 20 20 52 | 65 63 6f 6d 70 75 74 61 |-set? R|ecomputa|
|00003230| 74 69 6f 6e 20 69 73 20 | 64 72 69 76 65 6e 20 62 |tion is |driven b|
|00003240| 79 20 74 79 70 65 20 70 | 72 6f 70 61 67 61 74 69 |y type p|ropagati|
|00003250| 6f 6e 20 6f 6e 20 74 68 | 65 20 72 65 73 75 6c 74 |on on th|e result|
|00003260| 0a 63 6f 6e 74 69 6e 75 | 61 74 69 6f 6e 2e 0a 0a |.continu|ation...|
|00003270| 54 68 69 73 20 69 73 20 | 72 65 61 6c 6c 79 20 73 |This is |really s|
|00003280| 70 65 63 69 61 6c 2d 63 | 61 73 69 6e 67 20 6f 66 |pecial-c|asing of|
|00003290| 20 52 45 54 55 52 4e 20 | 6e 6f 64 65 73 2e 20 20 | RETURN |nodes. |
|000032a0| 54 68 65 20 72 65 74 75 | 72 6e 20 6e 6f 64 65 20 |The retu|rn node |
|000032b0| 68 61 73 20 74 68 65 20 | 74 79 70 65 0a 77 68 69 |has the |type.whi|
|000032c0| 63 68 20 69 73 20 74 68 | 65 20 75 6e 69 6f 6e 20 |ch is th|e union |
|000032d0| 6f 66 20 61 6c 6c 20 74 | 68 65 20 6e 6f 6e 2d 63 |of all t|he non-c|
|000032e0| 61 6c 6c 20 75 73 65 73 | 20 6f 66 20 74 68 65 20 |all uses| of the |
|000032f0| 72 65 73 75 6c 74 2e 20 | 20 54 68 65 20 74 61 69 |result. | The tai|
|00003300| 6c 2d 73 65 74 20 69 73 | 0a 66 6f 75 6e 64 20 74 |l-set is|.found t|
|00003310| 68 6f 75 67 68 20 74 68 | 65 20 6c 61 6d 62 64 61 |hough th|e lambda|
|00003320| 2e 20 20 57 65 20 63 61 | 6e 20 74 68 65 6e 20 72 |. We ca|n then r|
|00003330| 65 63 6f 6d 70 75 74 65 | 20 74 68 65 20 6f 76 65 |ecompute| the ove|
|00003340| 72 61 6c 6c 20 75 6e 69 | 6f 6e 20 62 79 20 74 61 |rall uni|on by ta|
|00003350| 6b 69 6e 67 20 74 68 65 | 0a 75 6e 69 6f 6e 20 6f |king the|.union o|
|00003360| 66 20 74 68 65 20 74 79 | 70 65 20 70 65 72 20 72 |f the ty|pe per r|
|00003370| 65 74 75 72 6e 20 6e 6f | 64 65 2c 20 72 61 74 68 |eturn no|de, rath|
|00003380| 65 72 20 74 68 61 6e 20 | 70 65 72 2d 75 73 65 2e |er than |per-use.|
|00003390| 0a 0a 0a 48 6f 77 20 64 | 6f 20 72 65 73 75 6c 74 |...How d|o result|
|000033a0| 20 74 79 70 65 20 61 73 | 73 65 72 74 69 6f 6e 73 | type as|sertions|
|000033b0| 20 77 6f 72 6b 3f 20 20 | 57 65 20 63 61 6e 27 74 | work? |We can't|
|000033c0| 20 69 6e 74 65 72 73 65 | 63 74 20 74 68 65 20 61 | interse|ct the a|
|000033d0| 73 73 65 72 74 69 6f 6e | 73 20 61 63 72 6f 73 73 |ssertion|s across|
|000033e0| 0a 61 6c 6c 20 66 75 6e | 63 74 69 6f 6e 73 20 69 |.all fun|ctions i|
|000033f0| 6e 20 74 68 65 20 65 71 | 75 69 76 61 6c 65 6e 63 |n the eq|uivalenc|
|00003400| 65 20 63 6c 61 73 73 2c | 20 73 69 6e 63 65 20 73 |e class,| since s|
|00003410| 6f 6d 65 20 6f 66 20 74 | 68 65 20 63 61 6c 6c 20 |ome of t|he call |
|00003420| 63 6f 6d 62 69 6e 61 74 | 69 6f 6e 73 20 6d 61 79 |combinat|ions may|
|00003430| 0a 6e 6f 74 20 68 61 70 | 70 65 6e 20 28 6f 72 20 |.not hap|pen (or |
|00003440| 65 76 65 6e 20 62 65 20 | 70 6f 73 73 69 62 6c 65 |even be |possible|
|00003450| 29 2e 20 20 57 65 20 63 | 61 6e 20 69 6e 74 65 72 |). We c|an inter|
|00003460| 73 65 63 74 20 74 68 65 | 20 61 73 73 65 72 74 69 |sect the| asserti|
|00003470| 6f 6e 20 6f 66 20 74 68 | 65 20 72 65 73 75 6c 74 |on of th|e result|
|00003480| 0a 77 69 74 68 20 74 68 | 65 20 64 65 72 69 76 65 |.with th|e derive|
|00003490| 64 20 74 79 70 65 73 20 | 66 6f 72 20 6e 6f 6e 2d |d types |for non-|
|000034a0| 63 61 6c 6c 20 75 73 65 | 73 2e 0a 0a 57 68 65 6e |call use|s...When|
|000034b0| 20 77 65 20 64 6f 20 61 | 20 74 61 69 6c 20 63 61 | we do a| tail ca|
|000034c0| 6c 6c 2c 20 77 65 20 6f | 62 76 69 6f 75 73 6c 79 |ll, we o|bviously|
|000034d0| 20 63 61 6e 27 74 20 63 | 68 65 63 6b 20 74 68 61 | can't c|heck tha|
|000034e0| 74 20 74 68 65 20 72 65 | 74 75 72 6e 65 64 20 76 |t the re|turned v|
|000034f0| 61 6c 75 65 0a 6d 61 74 | 63 68 65 73 20 6f 75 72 |alue.mat|ches our|
|00003500| 20 61 73 73 65 72 74 69 | 6f 6e 2e 20 20 41 6c 74 | asserti|on. Alt|
|00003510| 68 6f 75 67 68 20 69 6e | 20 70 72 69 6e 63 69 70 |hough in| princip|
|00003520| 6c 65 2c 20 77 65 20 77 | 6f 75 6c 64 20 6c 69 6b |le, we w|ould lik|
|00003530| 65 20 74 6f 20 62 65 20 | 61 62 6c 65 20 74 6f 0a |e to be |able to.|
|00003540| 63 68 65 63 6b 20 61 6c | 6c 20 61 73 73 65 72 74 |check al|l assert|
|00003550| 69 6f 6e 73 2c 20 74 6f | 20 70 72 65 73 65 72 76 |ions, to| preserv|
|00003560| 65 20 73 79 73 74 65 6d | 20 69 6e 74 65 67 72 69 |e system| integri|
|00003570| 74 79 2c 20 77 65 20 6f | 6e 6c 79 20 6e 65 65 64 |ty, we o|nly need|
|00003580| 20 74 6f 20 63 68 65 63 | 6b 0a 61 73 73 65 72 74 | to chec|k.assert|
|00003590| 69 6f 6e 73 20 74 68 61 | 74 20 77 65 20 64 65 70 |ions tha|t we dep|
|000035a0| 65 6e 64 20 6f 6e 2e 20 | 20 57 65 20 63 61 6e 20 |end on. | We can |
|000035b0| 61 66 66 6f 72 64 20 74 | 6f 20 6c 6f 73 65 20 73 |afford t|o lose s|
|000035c0| 6f 6d 65 20 61 73 73 65 | 72 74 69 6f 6e 20 69 6e |ome asse|rtion in|
|000035d0| 66 6f 72 6d 61 74 69 6f | 6e 0a 61 73 20 6c 6f 6e |formatio|n.as lon|
|000035e0| 67 20 61 73 20 77 65 20 | 65 6e 74 69 72 65 6c 79 |g as we |entirely|
|000035f0| 20 6c 6f 73 65 20 69 74 | 2c 20 69 67 6e 6f 72 69 | lose it|, ignori|
|00003600| 6e 67 20 69 74 20 66 6f | 72 20 74 79 70 65 20 69 |ng it fo|r type i|
|00003610| 6e 66 65 72 65 6e 63 65 | 20 61 73 20 77 65 6c 6c |nference| as well|
|00003620| 20 61 73 20 66 6f 72 0a | 74 79 70 65 20 63 68 65 | as for.|type che|
|00003630| 63 6b 69 6e 67 2e 0a 0a | 54 68 69 6e 67 73 20 77 |cking...|Things w|
|00003640| 69 6c 6c 20 77 6f 72 6b | 20 6f 75 74 2c 20 73 69 |ill work| out, si|
|00003650| 6e 63 65 20 74 68 65 20 | 63 61 6c 6c 65 72 20 77 |nce the |caller w|
|00003660| 69 6c 6c 20 73 65 65 20 | 74 68 65 20 74 61 69 6c |ill see |the tail|
|00003670| 2d 69 6e 66 6f 20 74 79 | 70 65 20 61 73 20 74 68 |-info ty|pe as th|
|00003680| 65 0a 64 65 72 69 76 65 | 64 20 74 79 70 65 20 66 |e.derive|d type f|
|00003690| 6f 72 20 74 68 65 20 63 | 61 6c 6c 2c 20 61 6e 64 |or the c|all, and|
|000036a0| 20 77 69 6c 6c 20 65 6d | 69 74 20 61 20 74 79 70 | will em|it a typ|
|000036b0| 65 20 63 68 65 63 6b 20 | 69 66 20 69 74 20 6e 65 |e check |if it ne|
|000036c0| 65 64 73 20 61 20 73 74 | 72 6f 6e 67 65 72 0a 72 |eds a st|ronger.r|
|000036d0| 65 73 75 6c 74 2e 0a 0a | 41 20 72 65 6d 61 69 6e |esult...|A remain|
|000036e0| 69 6e 67 20 71 75 65 73 | 74 69 6f 6e 20 69 73 20 |ing ques|tion is |
|000036f0| 77 68 65 74 68 65 72 20 | 77 65 20 73 68 6f 75 6c |whether |we shoul|
|00003700| 64 20 69 6e 74 65 72 73 | 65 63 74 20 74 68 65 20 |d inters|ect the |
|00003710| 61 73 73 65 72 74 69 6f | 6e 20 77 69 74 68 0a 70 |assertio|n with.p|
|00003720| 65 72 2d 52 45 54 55 52 | 4e 20 64 65 72 69 76 65 |er-RETUR|N derive|
|00003730| 64 20 74 79 70 65 73 20 | 66 72 6f 6d 20 74 68 65 |d types |from the|
|00003740| 20 76 65 72 79 20 62 65 | 67 69 6e 6e 69 6e 67 20 | very be|ginning |
|00003750| 28 69 2e 65 2e 20 62 65 | 66 6f 72 65 20 74 68 65 |(i.e. be|fore the|
|00003760| 20 74 79 70 65 20 63 68 | 65 63 6b 0a 70 61 73 73 | type ch|eck.pass|
|00003770| 29 2e 20 20 49 20 74 68 | 69 6e 6b 20 74 68 65 20 |). I th|ink the |
|00003780| 61 6e 73 77 65 72 20 69 | 73 20 79 65 73 2e 20 20 |answer i|s yes. |
|00003790| 57 65 20 64 65 6c 61 79 | 20 74 68 65 20 74 79 70 |We delay| the typ|
|000037a0| 65 20 63 68 65 63 6b 20 | 70 61 73 73 20 73 6f 20 |e check |pass so |
|000037b0| 74 68 61 74 20 77 65 20 | 63 61 6e 0a 67 65 74 20 |that we |can.get |
|000037c0| 6f 75 72 20 62 65 73 74 | 20 67 75 65 73 73 20 66 |our best| guess f|
|000037d0| 6f 72 20 74 68 65 20 64 | 65 72 69 76 65 64 20 74 |or the d|erived t|
|000037e0| 79 70 65 20 62 65 66 6f | 72 65 20 77 65 20 64 65 |ype befo|re we de|
|000037f0| 63 69 64 65 20 77 68 65 | 74 68 65 72 20 61 20 63 |cide whe|ther a c|
|00003800| 68 65 63 6b 20 69 73 0a | 6e 65 63 65 73 73 61 72 |heck is.|necessar|
|00003810| 79 2e 20 20 42 75 74 20 | 77 69 74 68 20 74 68 65 |y. But |with the|
|00003820| 20 66 75 6e 63 74 69 6f | 6e 20 72 65 74 75 72 6e | functio|n return|
|00003830| 20 74 79 70 65 2c 20 77 | 65 20 61 72 65 6e 27 74 | type, w|e aren't|
|00003840| 20 63 6f 6d 6d 69 74 74 | 69 6e 67 20 74 6f 20 64 | committ|ing to d|
|00003850| 6f 69 6e 67 0a 61 6e 79 | 20 74 79 70 65 20 63 68 |oing.any| type ch|
|00003860| 65 63 6b 20 77 68 65 6e | 20 77 65 20 69 6e 74 65 |eck when| we inte|
|00003870| 72 73 65 63 74 20 77 69 | 74 68 20 74 68 65 20 74 |rsect wi|th the t|
|00003880| 79 70 65 20 61 73 73 65 | 72 74 69 6f 6e 3b 20 74 |ype asse|rtion; t|
|00003890| 68 65 20 6e 65 65 64 20 | 74 6f 20 74 79 70 65 0a |he need |to type.|
|000038a0| 63 68 65 63 6b 20 69 73 | 20 73 74 69 6c 6c 20 64 |check is| still d|
|000038b0| 65 74 65 72 6d 69 6e 65 | 64 20 69 6e 20 74 68 65 |etermine|d in the|
|000038c0| 20 74 79 70 65 20 63 68 | 65 63 6b 20 70 61 73 73 | type ch|eck pass|
|000038d0| 20 62 79 20 65 78 61 6d | 69 6e 61 74 69 6f 6e 20 | by exam|ination |
|000038e0| 6f 66 20 74 68 65 20 72 | 65 73 75 6c 74 0a 63 6f |of the r|esult.co|
|000038f0| 6e 74 69 6e 75 61 74 69 | 6f 6e 2e 0a 0a 57 68 61 |ntinuati|on...Wha|
|00003900| 74 20 69 73 20 74 68 65 | 20 72 65 6c 61 74 69 6f |t is the| relatio|
|00003910| 6e 73 68 69 70 20 62 65 | 74 77 65 65 6e 20 74 68 |nship be|tween th|
|00003920| 65 20 70 65 72 2d 52 45 | 54 55 52 4e 20 74 79 70 |e per-RE|TURN typ|
|00003930| 65 73 20 61 6e 64 20 74 | 68 65 20 74 79 70 65 73 |es and t|he types|
|00003940| 20 69 6e 20 74 68 65 0a | 72 65 73 75 6c 74 20 63 | in the.|result c|
|00003950| 6f 6e 74 69 6e 75 61 74 | 69 6f 6e 3f 20 20 54 68 |ontinuat|ion? Th|
|00003960| 65 20 61 73 73 65 72 74 | 69 6f 6e 20 69 73 20 65 |e assert|ion is e|
|00003970| 78 61 63 74 6c 79 20 74 | 68 65 20 43 6f 6e 74 69 |xactly t|he Conti|
|00003980| 6e 75 61 74 69 6f 6e 2d | 41 73 73 65 72 74 65 64 |nuation-|Asserted|
|00003990| 2d 54 79 70 65 0a 28 6e | 6f 74 65 20 74 68 61 74 |-Type.(n|ote that|
|000039a0| 20 74 68 65 20 61 73 73 | 65 72 74 65 64 20 74 79 | the ass|erted ty|
|000039b0| 70 65 20 6f 66 20 72 65 | 73 75 6c 74 20 63 6f 6e |pe of re|sult con|
|000039c0| 74 69 6e 75 61 74 69 6f | 6e 73 20 77 69 6c 6c 20 |tinuatio|ns will |
|000039d0| 6e 65 76 65 72 20 63 68 | 61 6e 67 65 20 61 66 74 |never ch|ange aft|
|000039e0| 65 72 0a 49 43 52 20 63 | 6f 6e 76 65 72 73 69 6f |er.ICR c|onversio|
|000039f0| 6e 29 2e 20 20 54 68 65 | 20 70 65 72 2d 52 45 54 |n). The| per-RET|
|00003a00| 55 52 4e 20 64 65 72 69 | 76 65 64 20 74 79 70 65 |URN deri|ved type|
|00003a10| 20 69 73 20 64 69 66 66 | 65 72 65 6e 74 20 74 68 | is diff|erent th|
|00003a20| 61 6e 20 74 68 65 0a 43 | 6f 6e 74 69 6e 75 61 74 |an the.C|ontinuat|
|00003a30| 69 6f 6e 2d 44 65 72 69 | 76 65 64 2d 54 79 70 65 |ion-Deri|ved-Type|
|00003a40| 2c 20 73 69 6e 63 65 20 | 69 74 20 69 73 20 69 6e |, since |it is in|
|00003a50| 74 65 72 73 65 63 74 65 | 64 20 77 69 74 68 20 74 |tersecte|d with t|
|00003a60| 68 65 20 61 73 73 65 72 | 74 65 64 20 74 79 70 65 |he asser|ted type|
|00003a70| 20 65 76 65 6e 0a 62 65 | 66 6f 72 65 20 54 79 70 | even.be|fore Typ|
|00003a80| 65 20 43 68 65 63 6b 20 | 72 75 6e 73 2e 20 20 49 |e Check |runs. I|
|00003a90| 67 6e 6f 72 69 6e 67 20 | 74 68 65 20 43 6f 6e 74 |gnoring |the Cont|
|00003aa0| 69 6e 75 61 74 69 6f 6e | 2d 44 65 72 69 76 65 64 |inuation|-Derived|
|00003ab0| 2d 54 79 70 65 20 70 72 | 6f 62 61 62 6c 79 20 6d |-Type pr|obably m|
|00003ac0| 61 6b 65 73 0a 6c 69 66 | 65 20 73 69 6d 70 6c 65 |akes.lif|e simple|
|00003ad0| 72 20 61 6e 79 77 61 79 | 2c 20 73 69 6e 63 65 20 |r anyway|, since |
|00003ae0| 74 68 69 73 20 62 72 65 | 61 6b 73 20 74 68 65 20 |this bre|aks the |
|00003af0| 70 6f 74 65 6e 74 69 61 | 6c 20 63 69 72 63 75 6c |potentia|l circul|
|00003b00| 61 72 69 74 79 20 6f 66 | 20 74 68 65 0a 54 61 69 |arity of| the.Tai|
|00003b10| 6c 2d 49 6e 66 6f 2d 54 | 79 70 65 20 77 69 6c 6c |l-Info-T|ype will|
|00003b20| 20 61 66 66 65 63 74 69 | 6e 67 20 74 68 65 20 43 | affecti|ng the C|
|00003b30| 6f 6e 74 69 6e 75 61 74 | 69 6f 6e 2d 44 65 72 69 |ontinuat|ion-Deri|
|00003b40| 76 65 64 2d 54 79 70 65 | 2c 20 77 68 69 63 68 20 |ved-Type|, which |
|00003b50| 61 66 66 65 63 74 73 2e | 2e 2e 0a 0a 57 68 65 6e |affects.|....When|
|00003b60| 20 61 20 67 69 76 65 6e | 20 72 65 74 75 72 6e 20 | a given| return |
|00003b70| 68 61 73 20 6e 6f 20 6e | 6f 6e 2d 63 61 6c 6c 20 |has no n|on-call |
|00003b80| 75 73 65 73 2c 20 77 65 | 20 72 65 70 72 65 73 65 |uses, we| represe|
|00003b90| 6e 74 20 74 68 69 73 20 | 62 79 20 75 73 69 6e 67 |nt this |by using|
|00003ba0| 0a 2a 65 6d 70 74 79 2d | 74 79 70 65 2a 2e 20 20 |.*empty-|type*. |
|00003bb0| 54 68 69 73 20 63 6f 6e | 73 69 73 74 65 6e 74 20 |This con|sistent |
|00003bc0| 77 69 74 68 20 74 68 65 | 20 69 6e 74 65 72 70 72 |with the| interpr|
|00003bd0| 65 74 61 74 69 6f 6e 20 | 74 68 61 74 20 61 20 72 |etation |that a r|
|00003be0| 65 74 75 72 6e 20 74 79 | 70 65 20 6f 66 0a 4e 49 |eturn ty|pe of.NI|
|00003bf0| 4c 20 6d 65 61 6e 73 20 | 74 68 65 20 66 75 6e 63 |L means |the func|
|00003c00| 74 69 6f 6e 20 63 61 6e | 27 74 20 72 65 74 75 72 |tion can|'t retur|
|00003c10| 6e 2e 0a 0a 0c 0a 5c 73 | 65 63 74 69 6f 6e 7b 48 |n.....\s|ection{H|
|00003c20| 61 69 72 79 20 66 75 6e | 63 74 69 6f 6e 20 72 65 |airy fun|ction re|
|00003c30| 70 72 65 73 65 6e 74 61 | 74 69 6f 6e 7d 0a 0a 4e |presenta|tion}..N|
|00003c40| 6f 6e 2d 66 69 78 65 64 | 2d 61 72 67 20 66 75 6e |on-fixed|-arg fun|
|00003c50| 63 74 69 6f 6e 73 20 61 | 72 65 20 72 65 70 72 65 |ctions a|re repre|
|00003c60| 73 65 6e 74 65 64 20 75 | 73 69 6e 67 20 4f 70 74 |sented u|sing Opt|
|00003c70| 69 6f 6e 61 6c 2d 44 69 | 73 70 61 74 63 68 2e 20 |ional-Di|spatch. |
|00003c80| 20 41 6e 0a 4f 70 74 69 | 6f 6e 61 6c 2d 44 69 73 | An.Opti|onal-Dis|
|00003c90| 70 61 74 63 68 20 68 61 | 73 20 61 6e 20 65 6e 74 |patch ha|s an ent|
|00003ca0| 72 79 2d 70 6f 69 6e 74 | 20 66 75 6e 63 74 69 6f |ry-point| functio|
|00003cb0| 6e 20 66 6f 72 20 65 61 | 63 68 20 6c 65 67 61 6c |n for ea|ch legal|
|00003cc0| 20 6e 75 6d 62 65 72 20 | 6f 66 0a 6f 70 74 69 6f | number |of.optio|
|00003cd0| 6e 61 6c 73 2c 20 61 6e | 64 20 6f 6e 65 20 66 6f |nals, an|d one fo|
|00003ce0| 72 20 77 68 65 6e 20 65 | 78 74 72 61 20 61 72 67 |r when e|xtra arg|
|00003cf0| 73 20 61 72 65 20 70 72 | 65 73 65 6e 74 2e 20 20 |s are pr|esent. |
|00003d00| 45 61 63 68 20 65 6e 74 | 72 79 20 70 6f 69 6e 74 |Each ent|ry point|
|00003d10| 20 66 75 6e 63 74 69 6f | 6e 0a 69 73 20 61 20 73 | functio|n.is a s|
|00003d20| 69 6d 70 6c 65 20 6c 61 | 6d 62 64 61 2e 20 20 54 |imple la|mbda. T|
|00003d30| 68 65 20 65 6e 74 72 79 | 20 70 6f 69 6e 74 20 66 |he entry| point f|
|00003d40| 75 6e 63 74 69 6f 6e 20 | 66 6f 72 20 61 6e 20 6f |unction |for an o|
|00003d50| 70 74 69 6f 6e 61 6c 20 | 69 73 20 70 61 73 73 65 |ptional |is passe|
|00003d60| 64 20 74 68 65 0a 61 72 | 67 75 6d 65 6e 74 73 20 |d the.ar|guments |
|00003d70| 77 68 69 63 68 20 77 65 | 72 65 20 61 63 74 75 61 |which we|re actua|
|00003d80| 6c 6c 79 20 73 75 70 70 | 6c 69 65 64 3b 20 74 68 |lly supp|lied; th|
|00003d90| 65 20 65 6e 74 72 79 20 | 70 6f 69 6e 74 20 66 75 |e entry |point fu|
|00003da0| 6e 63 74 69 6f 6e 20 69 | 73 20 65 78 70 65 63 74 |nction i|s expect|
|00003db0| 65 64 20 74 6f 0a 64 65 | 66 61 75 6c 74 20 61 6e |ed to.de|fault an|
|00003dc0| 79 20 72 65 6d 61 69 6e | 69 6e 67 20 70 61 72 61 |y remain|ing para|
|00003dd0| 6d 65 74 65 72 73 20 61 | 6e 64 20 65 76 61 6c 75 |meters a|nd evalu|
|00003de0| 61 74 65 20 74 68 65 20 | 61 63 74 75 61 6c 20 66 |ate the |actual f|
|00003df0| 75 6e 63 74 69 6f 6e 20 | 62 6f 64 79 2e 0a 0a 49 |unction |body...I|
|00003e00| 66 20 6e 6f 20 73 75 70 | 70 6c 69 65 64 2d 70 20 |f no sup|plied-p |
|00003e10| 61 72 67 20 69 73 20 70 | 72 65 73 65 6e 74 2c 20 |arg is p|resent, |
|00003e20| 74 68 65 6e 20 77 65 20 | 63 61 6e 20 64 6f 20 74 |then we |can do t|
|00003e30| 68 69 73 20 66 61 69 72 | 6c 79 20 65 61 73 69 6c |his fair|ly easil|
|00003e40| 79 20 62 79 20 68 61 76 | 69 6e 67 0a 65 61 63 68 |y by hav|ing.each|
|00003e50| 20 65 6e 74 72 79 20 70 | 6f 69 6e 74 20 73 75 70 | entry p|oint sup|
|00003e60| 70 6c 79 20 69 74 73 20 | 64 65 66 61 75 6c 74 20 |ply its |default |
|00003e70| 61 6e 64 20 63 61 6c 6c | 20 74 68 65 20 6e 65 78 |and call| the nex|
|00003e80| 74 20 65 6e 74 72 79 20 | 70 6f 69 6e 74 2c 20 77 |t entry |point, w|
|00003e90| 69 74 68 20 74 68 65 0a | 6c 61 73 74 20 65 6e 74 |ith the.|last ent|
|00003ea0| 72 79 20 70 6f 69 6e 74 | 20 63 6f 6e 74 61 69 6e |ry point| contain|
|00003eb0| 69 6e 67 20 74 68 65 20 | 62 6f 64 79 2e 20 20 49 |ing the |body. I|
|00003ec0| 66 20 74 68 65 72 65 20 | 61 72 65 20 73 75 70 70 |f there |are supp|
|00003ed0| 6c 69 65 64 2d 70 20 61 | 72 67 73 2c 20 74 68 65 |lied-p a|rgs, the|
|00003ee0| 6e 20 65 6e 74 72 79 0a | 70 6f 69 6e 74 20 66 75 |n entry.|point fu|
|00003ef0| 6e 63 74 69 6f 6e 20 69 | 73 20 72 65 70 6c 61 63 |nction i|s replac|
|00003f00| 65 64 20 77 69 74 68 20 | 61 20 66 75 6e 63 74 69 |ed with |a functi|
|00003f10| 6f 6e 20 74 68 61 74 20 | 63 61 6c 6c 73 20 74 68 |on that |calls th|
|00003f20| 65 20 6f 72 69 67 69 6e | 61 6c 20 65 6e 74 72 79 |e origin|al entry|
|00003f30| 0a 66 75 6e 63 74 69 6f | 6e 20 77 69 74 68 20 54 |.functio|n with T|
|00003f40| 27 73 20 69 6e 73 65 72 | 74 65 64 20 61 74 20 74 |'s inser|ted at t|
|00003f50| 68 65 20 70 6f 73 69 74 | 69 6f 6e 20 6f 66 20 61 |he posit|ion of a|
|00003f60| 6c 6c 20 74 68 65 20 73 | 75 70 70 6c 69 65 64 20 |ll the s|upplied |
|00003f70| 61 72 67 73 20 77 69 74 | 68 0a 73 75 70 70 6c 69 |args wit|h.suppli|
|00003f80| 65 64 2d 70 20 70 61 72 | 61 6d 65 74 65 72 73 2e |ed-p par|ameters.|
|00003f90| 0a 0a 57 65 20 77 61 6e | 74 20 74 6f 20 62 65 20 |..We wan|t to be |
|00003fa0| 61 20 62 69 74 20 63 6c | 65 76 65 72 20 61 62 6f |a bit cl|ever abo|
|00003fb0| 75 74 20 68 6f 77 20 77 | 65 20 68 61 6e 64 6c 65 |ut how w|e handle|
|00003fc0| 20 61 72 67 75 6d 65 6e | 74 73 20 64 65 63 6c 61 | argumen|ts decla|
|00003fd0| 72 65 64 20 73 70 65 63 | 69 61 6c 20 77 68 65 6e |red spec|ial when|
|00003fe0| 0a 64 6f 69 6e 67 20 6f | 70 74 69 6f 6e 61 6c 20 |.doing o|ptional |
|00003ff0| 64 65 66 61 75 6c 74 69 | 6e 67 2c 20 6f 72 20 77 |defaulti|ng, or w|
|00004000| 65 20 77 69 6c 6c 20 65 | 6d 69 74 20 72 65 61 6c |e will e|mit real|
|00004010| 6c 79 20 67 72 6f 73 73 | 20 63 6f 64 65 20 66 6f |ly gross| code fo|
|00004020| 72 20 73 70 65 63 69 61 | 6c 0a 6f 70 74 69 6f 6e |r specia|l.option|
|00004030| 61 6c 73 2e 20 20 49 66 | 20 77 65 20 62 6f 75 6e |als. If| we boun|
|00004040| 64 20 74 68 65 20 61 72 | 67 20 73 70 65 63 69 61 |d the ar|g specia|
|00004050| 6c 6c 79 20 6f 76 65 72 | 20 74 68 65 20 65 6e 74 |lly over| the ent|
|00004060| 69 72 65 20 65 6e 74 72 | 79 2d 70 6f 69 6e 74 20 |ire entr|y-point |
|00004070| 66 75 6e 63 74 69 6f 6e | 2c 0a 74 68 65 6e 20 74 |function|,.then t|
|00004080| 68 65 20 65 6e 74 72 79 | 20 70 6f 69 6e 74 20 66 |he entry| point f|
|00004090| 75 6e 63 74 69 6f 6e 20 | 77 6f 75 6c 64 20 62 65 |unction |would be|
|000040a0| 20 63 61 75 73 65 64 20 | 74 6f 20 62 65 20 6e 6f | caused |to be no|
|000040b0| 6e 2d 74 61 69 6c 2d 72 | 65 63 75 72 73 69 76 65 |n-tail-r|ecursive|
|000040c0| 2e 20 20 57 68 61 74 0a | 77 65 20 63 61 6e 20 64 |. What.|we can d|
|000040d0| 6f 20 69 73 20 6f 6e 6c | 79 20 62 69 6e 64 20 74 |o is onl|y bind t|
|000040e0| 68 65 20 76 61 72 69 61 | 62 6c 65 20 73 70 65 63 |he varia|ble spec|
|000040f0| 69 61 6c 6c 79 20 61 72 | 6f 75 6e 64 20 74 68 65 |ially ar|ound the|
|00004100| 20 65 76 61 6c 75 61 74 | 69 6f 6e 20 6f 66 20 74 | evaluat|ion of t|
|00004110| 68 65 0a 64 65 66 61 75 | 6c 74 2c 20 61 6e 64 20 |he.defau|lt, and |
|00004120| 74 68 65 6e 20 72 65 61 | 64 20 74 68 65 20 73 70 |then rea|d the sp|
|00004130| 65 63 69 61 6c 20 61 6e | 64 20 73 74 6f 72 65 20 |ecial an|d store |
|00004140| 74 68 65 20 66 69 6e 61 | 6c 20 76 61 6c 75 65 20 |the fina|l value |
|00004150| 6f 66 20 74 68 65 20 73 | 70 65 63 69 61 6c 0a 69 |of the s|pecial.i|
|00004160| 6e 74 6f 20 61 20 6c 65 | 78 69 63 61 6c 20 76 61 |nto a le|xical va|
|00004170| 72 69 61 62 6c 65 20 77 | 68 69 63 68 20 77 65 20 |riable w|hich we |
|00004180| 74 68 65 6e 20 70 61 73 | 73 20 61 73 20 74 68 65 |then pas|s as the|
|00004190| 20 61 72 67 75 6d 65 6e | 74 2e 20 20 49 6e 20 74 | argumen|t. In t|
|000041a0| 68 65 20 63 6f 6d 6d 6f | 6e 20 63 61 73 65 0a 77 |he commo|n case.w|
|000041b0| 68 65 72 65 20 74 68 65 | 20 64 65 66 61 75 6c 74 |here the| default|
|000041c0| 20 69 73 20 61 20 63 6f | 6e 73 74 61 6e 74 2c 20 | is a co|nstant, |
|000041d0| 77 65 20 64 6f 6e 27 74 | 20 68 61 76 65 20 74 6f |we don't| have to|
|000041e0| 20 73 70 65 63 69 61 6c | 2d 62 69 6e 64 20 61 74 | special|-bind at|
|000041f0| 20 61 6c 6c 2c 20 73 69 | 6e 63 65 0a 74 68 65 20 | all, si|nce.the |
|00004200| 63 6f 6d 70 75 74 61 74 | 69 6f 6e 20 6f 66 20 74 |computat|ion of t|
|00004210| 68 65 20 64 65 66 61 75 | 6c 74 20 69 73 20 6e 6f |he defau|lt is no|
|00004220| 74 20 61 66 66 65 63 74 | 65 64 20 62 79 20 61 6e |t affect|ed by an|
|00004230| 64 20 63 61 6e 6e 6f 74 | 20 61 66 66 65 63 74 20 |d cannot| affect |
|00004240| 61 6e 79 20 73 70 65 63 | 69 61 6c 0a 62 69 6e 64 |any spec|ial.bind|
|00004250| 69 6e 67 73 2e 0a 0a 4b | 65 79 77 6f 72 64 20 61 |ings...K|eyword a|
|00004260| 6e 64 20 72 65 73 74 20 | 61 72 67 73 20 61 72 65 |nd rest |args are|
|00004270| 20 62 6f 74 68 20 69 6d | 70 6c 65 6d 65 6e 74 65 | both im|plemente|
|00004280| 64 20 75 73 69 6e 67 20 | 61 20 4c 45 58 50 52 2d |d using |a LEXPR-|
|00004290| 6c 69 6b 65 20 22 6d 6f | 72 65 20 61 72 67 73 22 |like "mo|re args"|
|000042a0| 0a 63 6f 6e 76 65 6e 74 | 69 6f 6e 2e 20 20 54 68 |.convent|ion. Th|
|000042b0| 65 20 4d 6f 72 65 2d 45 | 6e 74 72 79 20 74 61 6b |e More-E|ntry tak|
|000042c0| 65 73 20 74 77 6f 20 61 | 72 67 75 6d 65 6e 74 73 |es two a|rguments|
|000042d0| 20 69 6e 20 61 64 64 69 | 74 69 6f 6e 20 74 6f 20 | in addi|tion to |
|000042e0| 74 68 65 20 66 69 78 65 | 64 20 61 6e 64 0a 6f 70 |the fixe|d and.op|
|000042f0| 74 69 6f 6e 61 6c 20 61 | 72 67 75 6d 65 6e 74 73 |tional a|rguments|
|00004300| 3a 20 74 68 65 20 61 72 | 67 75 6d 65 6e 74 20 63 |: the ar|gument c|
|00004310| 6f 6e 74 65 78 74 20 61 | 6e 64 20 63 6f 75 6e 74 |ontext a|nd count|
|00004320| 2e 20 20 28 41 52 47 20 | 3c 63 6f 6e 74 65 78 74 |. (ARG |<context|
|00004330| 3e 20 3c 6e 3e 29 0a 61 | 63 63 65 73 73 65 73 20 |> <n>).a|ccesses |
|00004340| 74 68 65 20 4e 27 74 68 | 20 61 64 64 69 74 69 6f |the N'th| additio|
|00004350| 6e 61 6c 20 61 72 67 75 | 6d 65 6e 74 2e 20 20 4b |nal argu|ment. K|
|00004360| 65 79 77 6f 72 64 20 61 | 72 67 73 20 61 72 65 20 |eyword a|rgs are |
|00004370| 69 6d 70 6c 65 6d 65 6e | 74 65 64 20 64 69 72 65 |implemen|ted dire|
|00004380| 63 74 6c 79 0a 75 73 69 | 6e 67 20 74 68 69 73 20 |ctly.usi|ng this |
|00004390| 6d 65 63 68 61 6e 69 73 | 6d 2e 20 20 52 65 73 74 |mechanis|m. Rest|
|000043a0| 20 61 72 67 73 20 61 72 | 65 20 63 72 65 61 74 65 | args ar|e create|
|000043b0| 64 20 62 79 20 63 61 6c | 6c 69 6e 67 20 25 4c 69 |d by cal|ling %Li|
|000043c0| 73 74 69 66 79 2d 52 65 | 73 74 2d 41 72 67 73 20 |stify-Re|st-Args |
|000043d0| 77 69 74 68 0a 74 68 65 | 20 63 6f 6e 74 65 78 74 |with.the| context|
|000043e0| 20 61 6e 64 20 63 6f 75 | 6e 74 2e 0a 0a 54 68 65 | and cou|nt...The|
|000043f0| 20 4d 6f 72 65 2d 45 6e | 74 72 79 20 70 61 72 73 | More-En|try pars|
|00004400| 65 73 20 74 68 65 20 6b | 65 79 77 6f 72 64 20 61 |es the k|eyword a|
|00004410| 72 67 75 6d 65 6e 74 73 | 20 61 6e 64 20 70 61 73 |rguments| and pas|
|00004420| 73 65 73 20 74 68 65 20 | 76 61 6c 75 65 73 20 74 |ses the |values t|
|00004430| 6f 20 74 68 65 20 6d 61 | 69 6e 0a 66 75 6e 63 74 |o the ma|in.funct|
|00004440| 69 6f 6e 20 61 73 20 70 | 6f 73 69 74 69 6f 6e 61 |ion as p|ositiona|
|00004450| 6c 20 61 72 67 75 6d 65 | 6e 74 73 2e 20 20 49 66 |l argume|nts. If|
|00004460| 20 61 20 6b 65 79 77 6f | 72 64 20 64 65 66 61 75 | a keywo|rd defau|
|00004470| 6c 74 20 69 73 20 6e 6f | 74 20 63 6f 6e 73 74 61 |lt is no|t consta|
|00004480| 6e 74 2c 20 74 68 65 6e | 0a 77 65 20 70 61 73 73 |nt, then|.we pass|
|00004490| 20 61 20 73 75 70 70 6c | 69 65 64 2d 70 20 70 61 | a suppl|ied-p pa|
|000044a0| 72 61 6d 65 74 65 72 20 | 69 6e 74 6f 20 74 68 65 |rameter |into the|
|000044b0| 20 6d 61 69 6e 20 65 6e | 74 72 79 20 61 6e 64 20 | main en|try and |
|000044c0| 6c 65 74 20 69 74 20 77 | 6f 72 72 79 20 61 62 6f |let it w|orry abo|
|000044d0| 75 74 0a 64 65 66 61 75 | 6c 74 69 6e 67 20 74 68 |ut.defau|lting th|
|000044e0| 65 20 61 72 67 75 6d 65 | 6e 74 2e 20 20 53 69 6e |e argume|nt. Sin|
|000044f0| 63 65 20 74 68 65 20 6d | 61 69 6e 20 65 6e 74 72 |ce the m|ain entr|
|00004500| 79 20 61 63 63 65 70 74 | 73 20 6b 65 79 77 6f 72 |y accept|s keywor|
|00004510| 64 73 20 69 6e 20 70 61 | 72 73 65 64 20 66 6f 72 |ds in pa|rsed for|
|00004520| 6d 2c 0a 77 65 20 63 61 | 6e 20 70 61 72 73 65 20 |m,.we ca|n parse |
|00004530| 6b 65 79 77 6f 72 64 73 | 20 61 74 20 63 6f 6d 70 |keywords| at comp|
|00004540| 69 6c 65 20 74 69 6d 65 | 20 66 6f 72 20 63 61 6c |ile time| for cal|
|00004550| 6c 73 20 74 6f 20 6b 6e | 6f 77 6e 20 66 75 6e 63 |ls to kn|own func|
|00004560| 74 69 6f 6e 73 2e 20 20 | 57 65 20 6b 65 65 70 0a |tions. |We keep.|
|00004570| 61 72 6f 75 6e 64 20 74 | 68 65 20 6f 72 69 67 69 |around t|he origi|
|00004580| 6e 61 6c 20 70 61 72 73 | 65 64 20 6c 61 6d 62 64 |nal pars|ed lambd|
|00004590| 61 2d 6c 69 73 74 20 61 | 6e 64 20 72 65 6c 61 74 |a-list a|nd relat|
|000045a0| 65 64 20 69 6e 66 6f 72 | 6d 61 74 69 6f 6e 20 73 |ed infor|mation s|
|000045b0| 6f 20 74 68 61 74 20 70 | 65 6f 70 6c 65 0a 63 61 |o that p|eople.ca|
|000045c0| 6e 20 66 69 67 75 72 65 | 20 6f 75 74 20 68 6f 77 |n figure| out how|
|000045d0| 20 74 6f 20 63 61 6c 6c | 20 74 68 65 20 6d 61 69 | to call| the mai|
|000045e0| 6e 20 65 6e 74 72 79 2e | 0a 0a 0c 0a 5c 73 65 63 |n entry.|....\sec|
|000045f0| 74 69 6f 6e 7b 49 43 52 | 20 72 65 70 72 65 73 65 |tion{ICR| represe|
|00004600| 6e 74 61 74 69 6f 6e 20 | 6f 66 20 6e 6f 6e 2d 6c |ntation |of non-l|
|00004610| 6f 63 61 6c 20 65 78 69 | 74 73 7d 0a 0a 41 6c 6c |ocal exi|ts}..All|
|00004620| 20 65 78 69 74 73 20 61 | 72 65 20 69 6e 69 74 69 | exits a|re initi|
|00004630| 61 6c 6c 79 20 72 65 70 | 72 65 73 65 6e 74 65 64 |ally rep|resented|
|00004640| 20 62 79 20 45 58 49 54 | 20 6e 6f 64 65 73 3a 0a | by EXIT| nodes:.|
|00004650| 48 6f 77 20 61 62 6f 75 | 74 20 61 6e 20 45 78 69 |How abou|t an Exi|
|00004660| 74 20 6e 6f 64 65 3a 0a | 20 20 20 20 28 64 65 66 |t node:.| (def|
|00004670| 73 74 72 75 63 74 20 28 | 65 78 69 74 20 28 3a 69 |struct (|exit (:i|
|00004680| 6e 63 6c 75 64 65 20 6e | 6f 64 65 29 29 0a 20 20 |nclude n|ode)). |
|00004690| 20 20 20 20 76 61 6c 75 | 65 29 0a 54 68 65 20 45 | valu|e).The E|
|000046a0| 78 69 74 20 6e 6f 64 65 | 20 75 73 65 73 20 74 68 |xit node| uses th|
|000046b0| 65 20 63 6f 6e 74 69 6e | 75 61 74 69 6f 6e 20 74 |e contin|uation t|
|000046c0| 68 61 74 20 69 73 20 74 | 6f 20 72 65 63 65 69 76 |hat is t|o receiv|
|000046d0| 65 20 74 68 65 20 74 68 | 72 6f 77 6e 20 56 61 6c |e the th|rown Val|
|000046e0| 75 65 2e 0a 44 75 72 69 | 6e 67 20 6f 70 74 69 6d |ue..Duri|ng optim|
|000046f0| 69 7a 61 74 69 6f 6e 2c | 20 69 66 20 77 65 20 64 |ization,| if we d|
|00004700| 69 73 63 6f 76 65 72 20 | 74 68 61 74 20 74 68 65 |iscover |that the|
|00004710| 20 43 6f 6e 74 27 73 20 | 68 6f 6d 65 2d 6c 61 6d | Cont's |home-lam|
|00004720| 62 64 61 20 69 73 20 74 | 68 65 20 73 61 6d 65 20 |bda is t|he same |
|00004730| 69 73 0a 74 68 65 20 65 | 78 69 74 20 6e 6f 64 65 |is.the e|xit node|
|00004740| 27 73 2c 20 74 68 65 6e | 20 77 65 20 63 61 6e 20 |'s, then| we can |
|00004750| 64 65 6c 65 74 65 20 74 | 68 65 20 45 78 69 74 20 |delete t|he Exit |
|00004760| 6e 6f 64 65 2c 20 73 75 | 62 73 74 69 74 75 74 69 |node, su|bstituti|
|00004770| 6e 67 20 74 68 65 20 43 | 6f 6e 74 20 66 6f 72 0a |ng the C|ont for.|
|00004780| 61 6c 6c 20 6f 66 20 74 | 68 65 20 56 61 6c 75 65 |all of t|he Value|
|00004790| 27 73 20 75 73 65 73 2e | 0a 0a 54 68 65 20 73 75 |'s uses.|..The su|
|000047a0| 63 63 65 73 73 6f 72 20 | 62 6c 6f 63 6b 20 6f 66 |ccessor |block of|
|000047b0| 20 61 6e 20 45 58 49 54 | 20 69 73 20 74 68 65 20 | an EXIT| is the |
|000047c0| 65 6e 74 72 79 20 62 6c | 6f 63 6b 20 69 6e 20 74 |entry bl|ock in t|
|000047d0| 68 65 20 65 6e 74 65 72 | 65 64 20 65 6e 76 69 72 |he enter|ed envir|
|000047e0| 6f 6e 6d 65 6e 74 2e 0a | 53 6f 20 77 65 20 75 73 |onment..|So we us|
|000047f0| 65 20 74 68 65 20 45 78 | 69 74 20 6e 6f 64 65 20 |e the Ex|it node |
|00004800| 74 6f 20 6d 61 72 6b 20 | 74 68 65 20 70 6c 61 63 |to mark |the plac|
|00004810| 65 20 77 68 65 72 65 20 | 65 78 69 74 20 63 6f 64 |e where |exit cod|
|00004820| 65 20 69 73 20 69 6e 73 | 65 72 74 65 64 2e 20 20 |e is ins|erted. |
|00004830| 44 75 72 69 6e 67 0a 65 | 6e 76 69 72 6f 6e 6d 65 |During.e|nvironme|
|00004840| 6e 74 20 61 6e 61 6c 79 | 73 69 73 2c 20 77 65 20 |nt analy|sis, we |
|00004850| 6e 65 65 64 20 6f 6e 6c | 79 20 69 6e 73 65 72 74 |need onl|y insert|
|00004860| 20 61 20 73 69 6e 67 6c | 65 20 62 6c 6f 63 6b 20 | a singl|e block |
|00004870| 63 6f 6e 74 61 69 6e 69 | 6e 67 20 74 68 65 20 65 |containi|ng the e|
|00004880| 6e 74 72 79 0a 70 6f 69 | 6e 74 20 73 74 75 62 2e |ntry.poi|nt stub.|
|00004890| 0a 0a 57 65 20 65 6e 73 | 75 72 65 20 74 68 61 74 |..We ens|ure that|
|000048a0| 20 61 6c 6c 20 45 78 69 | 74 73 20 74 68 61 74 20 | all Exi|ts that |
|000048b0| 61 72 65 6e 27 74 20 66 | 6f 72 20 61 20 4e 4c 58 |aren't f|or a NLX|
|000048c0| 20 64 6f 6e 27 74 20 68 | 61 76 65 20 61 6e 79 20 | don't h|ave any |
|000048d0| 56 61 6c 75 65 2c 20 73 | 6f 20 74 68 61 74 0a 6c |Value, s|o that.l|
|000048e0| 6f 63 61 6c 20 65 78 69 | 74 73 20 6e 65 76 65 72 |ocal exi|ts never|
|000048f0| 20 72 65 71 75 69 72 65 | 20 61 6e 79 20 76 61 6c | require| any val|
|00004900| 75 65 20 6d 61 73 73 61 | 67 69 6e 67 2e 0a 0a 54 |ue massa|ging...T|
|00004910| 68 65 20 45 6e 74 72 79 | 20 6e 6f 64 65 20 6d 61 |he Entry| node ma|
|00004920| 72 6b 73 20 74 68 65 20 | 62 65 67 69 6e 6e 69 6e |rks the |beginnin|
|00004930| 67 20 6f 66 20 61 20 62 | 6c 6f 63 6b 20 6f 72 20 |g of a b|lock or |
|00004940| 74 61 67 62 6f 64 79 3a | 0a 20 20 20 20 28 64 65 |tagbody:|. (de|
|00004950| 66 73 74 72 75 63 74 20 | 28 65 6e 74 72 79 20 28 |fstruct |(entry (|
|00004960| 3a 69 6e 63 6c 75 64 65 | 20 6e 6f 64 65 29 29 0a |:include| node)).|
|00004970| 20 20 20 20 20 20 28 63 | 6f 6e 74 69 6e 75 61 74 | (c|ontinuat|
|00004980| 69 6f 6e 73 20 6e 69 6c | 20 3a 74 79 70 65 20 6c |ions nil| :type l|
|00004990| 69 73 74 29 29 20 0a 0a | 49 74 20 63 6f 6e 74 61 |ist)) ..|It conta|
|000049a0| 69 6e 73 20 61 20 6c 69 | 73 74 20 6f 66 20 61 6c |ins a li|st of al|
|000049b0| 6c 20 74 68 65 20 63 6f | 6e 74 69 6e 75 61 74 69 |l the co|ntinuati|
|000049c0| 6f 6e 73 20 74 68 61 74 | 20 74 68 65 20 62 6f 64 |ons that| the bod|
|000049d0| 79 20 63 6f 75 6c 64 20 | 65 78 69 74 20 74 6f 2e |y could |exit to.|
|000049e0| 20 20 54 68 65 0a 45 6e | 74 72 79 20 6e 6f 64 65 | The.En|try node|
|000049f0| 20 69 73 20 75 73 65 64 | 20 61 73 20 61 20 6d 61 | is used| as a ma|
|00004a00| 72 6b 65 72 20 66 6f 72 | 20 74 68 65 20 74 68 65 |rker for| the the|
|00004a10| 20 70 6c 61 63 65 20 74 | 6f 20 73 6e 61 70 73 68 | place t|o snapsh|
|00004a20| 6f 74 20 73 74 61 74 65 | 2c 20 69 6e 63 6c 75 64 |ot state|, includ|
|00004a30| 69 6e 67 0a 74 68 65 20 | 63 6f 6e 74 72 6f 6c 20 |ing.the |control |
|00004a40| 73 74 61 63 6b 20 70 6f | 69 6e 74 65 72 2e 20 20 |stack po|inter. |
|00004a50| 45 61 63 68 20 6c 61 6d | 62 64 61 20 68 61 73 20 |Each lam|bda has |
|00004a60| 61 20 6c 69 73 74 20 6f | 66 20 69 74 73 20 45 6e |a list o|f its En|
|00004a70| 74 72 69 65 73 20 73 6f | 0a 74 68 61 74 20 65 6e |tries so|.that en|
|00004a80| 76 69 72 6f 6e 6d 65 6e | 74 20 61 6e 61 6c 79 73 |vironmen|t analys|
|00004a90| 69 73 20 63 61 6e 20 66 | 69 67 75 72 65 20 6f 75 |is can f|igure ou|
|00004aa0| 74 20 77 68 69 63 68 20 | 63 6f 6e 74 69 6e 75 61 |t which |continua|
|00004ab0| 74 69 6f 6e 73 20 61 72 | 65 20 72 65 61 6c 6c 79 |tions ar|e really|
|00004ac0| 20 62 65 69 6e 67 0a 63 | 6c 6f 73 65 64 20 6f 76 | being.c|losed ov|
|00004ad0| 65 72 2e 20 20 54 68 65 | 72 65 20 69 73 20 6e 6f |er. The|re is no|
|00004ae0| 20 72 65 61 73 6f 6e 20 | 66 6f 72 20 6f 70 74 69 | reason |for opti|
|00004af0| 6d 69 7a 61 74 69 6f 6e | 20 74 6f 20 64 65 6c 65 |mization| to dele|
|00004b00| 74 65 20 45 6e 74 72 79 | 20 6e 6f 64 65 73 2c 0a |te Entry| nodes,.|
|00004b10| 73 69 6e 63 65 20 74 68 | 65 79 20 61 72 65 20 68 |since th|ey are h|
|00004b20| 61 72 6d 6c 65 73 73 20 | 69 6e 20 74 68 65 20 64 |armless |in the d|
|00004b30| 65 67 65 6e 65 72 61 74 | 65 20 63 61 73 65 3a 20 |egenerat|e case: |
|00004b40| 77 65 20 6a 75 73 74 20 | 65 6d 69 74 20 6e 6f 20 |we just |emit no |
|00004b50| 63 6f 64 65 20 28 6c 69 | 6b 65 20 61 0a 6e 6f 2d |code (li|ke a.no-|
|00004b60| 76 61 72 20 6c 65 74 29 | 2e 0a 0a 0a 57 65 20 72 |var let)|....We r|
|00004b70| 65 70 72 65 73 65 6e 74 | 20 43 41 54 43 48 20 75 |epresent| CATCH u|
|00004b80| 73 69 6e 67 20 74 68 65 | 20 6c 65 78 69 63 61 6c |sing the| lexical|
|00004b90| 20 65 78 69 74 20 6d 65 | 63 68 61 6e 69 73 6d 2e | exit me|chanism.|
|00004ba0| 20 20 57 65 20 64 6f 20 | 61 20 74 72 61 6e 73 66 | We do |a transf|
|00004bb0| 6f 72 6d 61 74 69 6f 6e | 0a 6c 69 6b 65 20 74 68 |ormation|.like th|
|00004bc0| 69 73 3a 0a 20 20 20 28 | 63 61 74 63 68 20 27 66 |is:. (|catch 'f|
|00004bd0| 6f 6f 20 78 78 78 29 20 | 20 3d 3d 3e 0a 20 20 20 |oo xxx) | ==>. |
|00004be0| 28 62 6c 6f 63 6b 20 5c | 23 3a 66 6f 6f 0a 20 20 |(block \|#:foo. |
|00004bf0| 20 20 20 28 25 63 61 74 | 63 68 20 5c 23 27 28 6c | (%cat|ch \#'(l|
|00004c00| 61 6d 62 64 61 20 28 29 | 20 28 72 65 74 75 72 6e |ambda ()| (return|
|00004c10| 2d 66 72 6f 6d 20 5c 23 | 3a 66 6f 6f 20 28 25 75 |-from \#|:foo (%u|
|00004c20| 6e 6b 6e 6f 77 6e 2d 76 | 61 6c 75 65 73 29 29 29 |nknown-v|alues)))|
|00004c30| 20 27 66 6f 6f 29 0a 20 | 20 20 20 20 28 25 77 69 | 'foo). | (%wi|
|00004c40| 74 68 69 6e 2d 63 6c 65 | 61 6e 75 70 20 3a 63 61 |thin-cle|anup :ca|
|00004c50| 74 63 68 0a 20 20 20 20 | 20 20 20 78 78 78 29 29 |tch. | xxx))|
|00004c60| 0a 0a 25 43 41 54 43 48 | 20 6a 75 73 74 20 73 65 |..%CATCH| just se|
|00004c70| 74 73 20 75 70 20 74 68 | 65 20 63 61 74 63 68 20 |ts up th|e catch |
|00004c80| 66 72 61 6d 65 20 77 68 | 69 63 68 20 70 6f 69 6e |frame wh|ich poin|
|00004c90| 74 73 20 74 6f 20 74 68 | 65 20 65 78 69 74 20 66 |ts to th|e exit f|
|00004ca0| 75 6e 63 74 69 6f 6e 2e | 20 20 25 43 61 74 63 68 |unction.| %Catch|
|00004cb0| 0a 69 73 20 61 6e 20 6f | 72 64 69 6e 61 72 79 20 |.is an o|rdinary |
|00004cc0| 66 75 6e 63 74 69 6f 6e | 20 61 73 20 66 61 72 20 |function| as far |
|00004cd0| 61 73 20 49 43 52 20 69 | 73 20 63 6f 6e 63 65 72 |as ICR i|s concer|
|00004ce0| 6e 65 64 2e 20 20 54 68 | 65 20 66 61 63 74 20 74 |ned. Th|e fact t|
|00004cf0| 68 61 74 20 74 68 65 20 | 63 61 74 63 68 65 72 0a |hat the |catcher.|
|00004d00| 6e 65 65 64 73 20 74 6f | 20 62 65 20 63 6c 65 61 |needs to| be clea|
|00004d10| 6e 65 64 20 75 70 20 69 | 73 20 65 78 70 72 65 73 |ned up i|s expres|
|00004d20| 73 65 64 20 62 79 20 74 | 68 65 20 43 6c 65 61 6e |sed by t|he Clean|
|00004d30| 75 70 20 73 6c 6f 74 73 | 20 69 6e 20 74 68 65 20 |up slots| in the |
|00004d40| 63 6f 6e 74 69 6e 75 61 | 74 69 6f 6e 73 0a 69 6e |continua|tions.in|
|00004d50| 20 74 68 65 20 62 6f 64 | 79 2e 20 20 25 55 4e 4b | the bod|y. %UNK|
|00004d60| 4e 4f 57 4e 2d 56 41 4c | 55 45 53 20 69 73 20 61 |NOWN-VAL|UES is a|
|00004d70| 20 64 75 6d 6d 79 20 66 | 75 6e 63 74 69 6f 6e 20 | dummy f|unction |
|00004d80| 63 61 6c 6c 20 77 68 69 | 63 68 20 72 65 70 72 65 |call whi|ch repre|
|00004d90| 73 65 6e 74 73 20 74 68 | 65 0a 66 61 63 74 20 74 |sents th|e.fact t|
|00004da0| 68 61 74 20 77 65 20 64 | 6f 6e 27 74 20 6b 6e 6f |hat we d|on't kno|
|00004db0| 77 20 77 68 61 74 20 76 | 61 6c 75 65 73 20 77 69 |w what v|alues wi|
|00004dc0| 6c 6c 20 62 65 20 74 68 | 72 6f 77 6e 2e 20 20 0a |ll be th|rown. .|
|00004dd0| 0a 25 57 49 54 48 49 4e | 2d 43 4c 45 41 4e 55 50 |.%WITHIN|-CLEANUP|
|00004de0| 20 69 73 20 61 20 73 70 | 65 63 69 61 6c 20 73 70 | is a sp|ecial sp|
|00004df0| 65 63 69 61 6c 20 66 6f | 72 6d 20 74 68 61 74 20 |ecial fo|rm that |
|00004e00| 69 6e 73 74 61 6e 74 69 | 61 74 65 73 20 69 74 73 |instanti|ates its|
|00004e10| 20 66 69 72 73 74 20 61 | 72 67 75 6d 65 6e 74 0a | first a|rgument.|
|00004e20| 61 73 20 74 68 65 20 63 | 75 72 72 65 6e 74 20 63 |as the c|urrent c|
|00004e30| 6c 65 61 6e 75 70 20 77 | 68 65 6e 20 63 6f 6e 76 |leanup w|hen conv|
|00004e40| 65 72 74 69 6e 67 20 74 | 68 65 20 62 6f 64 79 2e |erting t|he body.|
|00004e50| 20 20 49 6e 20 72 65 61 | 6c 69 74 79 2c 20 74 68 | In rea|lity, th|
|00004e60| 65 20 6c 61 6d 62 64 61 | 20 69 73 0a 61 6c 73 6f |e lambda| is.also|
|00004e70| 20 63 72 65 61 74 65 64 | 20 62 79 20 74 68 65 20 | created| by the |
|00004e80| 73 70 65 63 69 61 6c 20 | 73 70 65 63 69 61 6c 20 |special |special |
|00004e90| 66 6f 72 6d 20 25 45 53 | 43 41 50 45 2d 46 55 4e |form %ES|CAPE-FUN|
|00004ea0| 43 54 49 4f 4e 2c 20 77 | 68 69 63 68 20 67 69 76 |CTION, w|hich giv|
|00004eb0| 65 73 20 74 68 65 0a 6c | 61 6d 62 64 61 20 61 20 |es the.l|ambda a |
|00004ec0| 73 70 65 63 69 61 6c 20 | 3a 45 53 43 41 50 45 20 |special |:ESCAPE |
|00004ed0| 6b 69 6e 64 20 73 6f 20 | 74 68 61 74 20 74 68 65 |kind so |that the|
|00004ee0| 20 62 61 63 6b 20 65 6e | 64 20 6b 6e 6f 77 73 20 | back en|d knows |
|00004ef0| 6e 6f 74 20 74 6f 20 67 | 65 6e 65 72 61 74 65 20 |not to g|enerate |
|00004f00| 61 6e 79 0a 63 6f 64 65 | 20 66 6f 72 20 69 74 2e |any.code| for it.|
|00004f10| 0a 0a 0a 57 65 20 75 73 | 65 20 61 20 73 69 6d 69 |...We us|e a simi|
|00004f20| 6c 61 72 20 68 61 63 6b | 20 69 6e 20 55 6e 77 69 |lar hack| in Unwi|
|00004f30| 6e 64 2d 50 72 6f 74 65 | 63 74 20 74 6f 20 72 65 |nd-Prote|ct to re|
|00004f40| 70 72 65 73 65 6e 74 20 | 74 68 65 20 66 61 63 74 |present |the fact|
|00004f50| 20 74 68 61 74 20 74 68 | 65 20 63 6c 65 61 6e 75 | that th|e cleanu|
|00004f60| 70 0a 66 6f 72 6d 73 20 | 63 61 6e 20 62 65 20 69 |p.forms |can be i|
|00004f70| 6e 76 6f 6b 65 64 20 61 | 74 20 61 72 62 69 74 72 |nvoked a|t arbitr|
|00004f80| 61 72 69 6c 79 20 72 61 | 6e 64 6f 6d 20 74 69 6d |arily ra|ndom tim|
|00004f90| 65 73 2e 0a 20 20 20 20 | 28 75 6e 77 69 6e 64 2d |es.. |(unwind-|
|00004fa0| 70 72 6f 74 65 63 74 20 | 70 20 63 29 20 20 3d 3d |protect |p c) ==|
|00004fb0| 3e 0a 20 20 20 20 28 66 | 6c 65 74 20 28 28 5c 23 |>. (f|let ((\#|
|00004fc0| 3a 63 6c 65 61 6e 75 70 | 20 28 29 20 63 29 29 0a |:cleanup| () c)).|
|00004fd0| 20 20 20 20 20 20 28 62 | 6c 6f 63 6b 20 5c 23 3a | (b|lock \#:|
|00004fe0| 72 65 74 75 72 6e 0a 09 | 28 6d 75 6c 74 69 70 6c |return..|(multipl|
|00004ff0| 65 2d 76 61 6c 75 65 2d | 62 69 6e 64 0a 09 20 20 |e-value-|bind.. |
|00005000| 20 20 28 5c 23 3a 6e 65 | 78 74 20 5c 23 3a 73 74 | (\#:ne|xt \#:st|
|00005010| 61 72 74 20 5c 23 3a 63 | 6f 75 6e 74 29 0a 09 20 |art \#:c|ount).. |
|00005020| 20 20 20 28 62 6c 6f 63 | 6b 20 5c 23 3a 75 6e 77 | (bloc|k \#:unw|
|00005030| 69 6e 64 0a 09 20 20 20 | 20 20 20 28 25 75 6e 77 |ind.. | (%unw|
|00005040| 69 6e 64 2d 70 72 6f 74 | 65 63 74 20 5c 23 27 28 |ind-prot|ect \#'(|
|00005050| 6c 61 6d 62 64 61 20 28 | 78 29 20 28 72 65 74 75 |lambda (|x) (retu|
|00005060| 72 6e 2d 66 72 6f 6d 20 | 5c 23 3a 75 6e 77 69 6e |rn-from |\#:unwin|
|00005070| 64 20 78 29 29 29 0a 09 | 20 20 20 20 20 20 28 25 |d x)))..| (%|
|00005080| 77 69 74 68 69 6e 2d 63 | 6c 65 61 6e 75 70 20 3a |within-c|leanup :|
|00005090| 75 6e 77 69 6e 64 2d 70 | 72 6f 74 65 63 74 0a 09 |unwind-p|rotect..|
|000050a0| 09 28 72 65 74 75 72 6e | 2d 66 72 6f 6d 20 5c 23 |.(return|-from \#|
|000050b0| 3a 72 65 74 75 72 6e 20 | 70 29 29 29 0a 09 20 20 |:return |p))).. |
|000050c0| 28 5c 23 3a 63 6c 65 61 | 6e 75 70 29 0a 09 20 20 |(\#:clea|nup).. |
|000050d0| 28 25 63 6f 6e 74 69 6e | 75 65 2d 75 6e 77 69 6e |(%contin|ue-unwin|
|000050e0| 64 20 5c 23 3a 6e 65 78 | 74 20 5c 23 3a 73 74 61 |d \#:nex|t \#:sta|
|000050f0| 72 74 20 5c 23 3a 63 6f | 75 6e 74 29 29 29 29 0a |rt \#:co|unt)))).|
|00005100| 0a 57 65 20 75 73 65 20 | 74 68 65 20 62 6c 6f 63 |.We use |the bloc|
|00005110| 6b 20 5c 23 3a 75 6e 77 | 69 6e 64 20 74 6f 20 72 |k \#:unw|ind to r|
|00005120| 65 70 72 65 73 65 6e 74 | 20 74 68 65 20 65 6e 74 |epresent| the ent|
|00005130| 72 79 20 74 6f 20 63 6c | 65 61 6e 75 70 20 63 6f |ry to cl|eanup co|
|00005140| 64 65 20 69 6e 20 74 68 | 65 20 63 61 73 65 0a 77 |de in th|e case.w|
|00005150| 68 65 72 65 20 77 65 20 | 61 72 65 20 6e 6f 6e 2d |here we |are non-|
|00005160| 6c 6f 63 61 6c 6c 79 20 | 75 6e 77 6f 75 6e 64 2e |locally |unwound.|
|00005170| 20 20 43 61 6c 6c 69 6e | 67 20 6f 66 20 74 68 65 | Callin|g of the|
|00005180| 20 63 6c 65 61 6e 75 70 | 20 66 75 6e 63 74 69 6f | cleanup| functio|
|00005190| 6e 20 69 6e 20 74 68 65 | 0a 64 72 6f 70 2d 74 68 |n in the|.drop-th|
|000051a0| 72 6f 75 67 68 20 63 61 | 73 65 20 28 6f 72 20 61 |rough ca|se (or a|
|000051b0| 6e 79 20 6c 6f 63 61 6c | 20 65 78 69 74 29 20 69 |ny local| exit) i|
|000051c0| 73 20 68 61 6e 64 6c 65 | 64 20 62 79 20 63 6c 65 |s handle|d by cle|
|000051d0| 61 6e 75 70 20 67 65 6e | 65 72 61 74 69 6f 6e 2e |anup gen|eration.|
|000051e0| 20 20 57 65 0a 6d 61 6b | 65 20 74 68 65 20 63 6c | We.mak|e the cl|
|000051f0| 65 61 6e 75 70 20 61 20 | 66 75 6e 63 74 69 6f 6e |eanup a |function|
|00005200| 20 73 6f 20 74 68 61 74 | 20 63 6c 65 61 6e 75 70 | so that| cleanup|
|00005210| 20 67 65 6e 65 72 61 74 | 69 6f 6e 20 63 61 6e 20 | generat|ion can |
|00005220| 61 64 64 20 63 61 6c 6c | 73 20 61 74 20 6c 6f 63 |add call|s at loc|
|00005230| 61 6c 0a 65 78 69 74 73 | 20 66 72 6f 6d 20 74 68 |al.exits| from th|
|00005240| 65 20 70 72 6f 74 65 63 | 74 65 64 20 66 6f 72 6d |e protec|ted form|
|00005250| 2e 20 20 5c 23 3a 6e 65 | 78 74 2c 20 5c 23 3a 73 |. \#:ne|xt, \#:s|
|00005260| 74 61 72 74 20 61 6e 64 | 20 5c 23 3a 63 6f 75 6e |tart and| \#:coun|
|00005270| 74 20 61 72 65 20 73 74 | 61 74 65 20 75 73 65 64 |t are st|ate used|
|00005280| 20 69 6e 0a 74 68 65 20 | 63 61 73 65 20 77 68 65 | in.the |case whe|
|00005290| 72 65 20 77 65 20 61 72 | 65 20 75 6e 77 6f 75 6e |re we ar|e unwoun|
|000052a0| 64 2e 20 20 54 68 65 79 | 20 69 6e 64 69 63 61 74 |d. They| indicat|
|000052b0| 65 20 77 68 65 72 65 20 | 74 6f 20 67 6f 20 61 66 |e where |to go af|
|000052c0| 74 65 72 20 64 6f 69 6e | 67 20 74 68 65 0a 63 6c |ter doin|g the.cl|
|000052d0| 65 61 6e 75 70 20 61 6e | 64 20 77 68 61 74 20 76 |eanup an|d what v|
|000052e0| 61 6c 75 65 73 20 61 72 | 65 20 62 65 69 6e 67 20 |alues ar|e being |
|000052f0| 74 68 72 6f 77 6e 2e 20 | 20 54 68 65 20 63 6c 65 |thrown. | The cle|
|00005300| 61 6e 75 70 20 65 6e 63 | 6c 6f 73 65 73 20 6f 6e |anup enc|loses on|
|00005310| 6c 79 20 74 68 65 0a 70 | 72 6f 74 65 63 74 65 64 |ly the.p|rotected|
|00005320| 20 66 6f 72 6d 2e 20 20 | 41 73 20 69 6e 20 43 41 | form. |As in CA|
|00005330| 54 43 48 2c 20 74 68 65 | 20 65 73 63 61 70 65 20 |TCH, the| escape |
|00005340| 66 75 6e 63 74 69 6f 6e | 20 69 73 20 73 70 65 63 |function| is spec|
|00005350| 69 61 6c 6c 79 20 74 61 | 67 67 65 64 20 61 73 0a |ially ta|gged as.|
|00005360| 3a 45 53 43 41 50 45 2e | 20 20 54 68 65 20 63 6c |:ESCAPE.| The cl|
|00005370| 65 61 6e 75 70 20 66 75 | 6e 63 74 69 6f 6e 20 69 |eanup fu|nction i|
|00005380| 73 20 74 61 67 67 65 64 | 20 61 73 20 3a 43 4c 45 |s tagged| as :CLE|
|00005390| 41 4e 55 50 20 74 6f 20 | 69 6e 68 69 62 69 74 20 |ANUP to |inhibit |
|000053a0| 6c 65 74 20 63 6f 6e 76 | 65 72 73 69 6f 6e 0a 28 |let conv|ersion.(|
|000053b0| 73 69 6e 63 65 20 72 65 | 66 65 72 65 6e 63 65 73 |since re|ferences|
|000053c0| 20 61 72 65 20 61 64 64 | 65 64 20 69 6e 20 65 6e | are add|ed in en|
|000053d0| 76 69 72 6f 6e 6d 65 6e | 74 20 61 6e 61 6c 79 73 |vironmen|t analys|
|000053e0| 69 73 2e 29 0a 0a 4e 6f | 74 69 63 65 20 74 68 61 |is.)..No|tice tha|
|000053f0| 74 20 69 6d 70 6c 65 6d | 65 6e 74 69 6e 67 20 74 |t implem|enting t|
|00005400| 68 65 73 65 20 66 6f 72 | 6d 73 20 75 73 69 6e 67 |hese for|ms using|
|00005410| 20 63 6c 6f 73 75 72 65 | 73 20 6f 76 65 72 20 63 | closure|s over c|
|00005420| 6f 6e 74 69 6e 75 61 74 | 69 6f 6e 73 0a 65 6c 69 |ontinuat|ions.eli|
|00005430| 6d 69 6e 61 74 65 73 20 | 61 6e 79 20 6e 65 65 64 |minates |any need|
|00005440| 20 74 6f 20 73 70 65 63 | 69 61 6c 2d 63 61 73 65 | to spec|ial-case|
|00005450| 20 49 43 52 20 66 6c 6f | 77 20 61 6e 61 6c 79 73 | ICR flo|w analys|
|00005460| 69 73 2e 20 20 4f 62 76 | 69 6f 75 73 6c 79 20 77 |is. Obv|iously w|
|00005470| 65 20 64 6f 6e 27 74 0a | 72 65 61 6c 6c 79 20 77 |e don't.|really w|
|00005480| 61 6e 74 20 74 6f 20 6d | 61 6b 65 20 68 65 61 70 |ant to m|ake heap|
|00005490| 2d 63 6c 6f 73 75 72 65 | 73 20 68 65 72 65 2e 20 |-closure|s here. |
|000054a0| 20 49 6e 20 72 65 61 6c | 69 74 79 20 74 68 65 73 | In real|ity thes|
|000054b0| 65 20 66 75 6e 63 74 69 | 6f 6e 73 20 61 72 65 0a |e functi|ons are.|
|000054c0| 73 70 65 63 69 61 6c 2d | 63 61 73 65 64 20 62 79 |special-|cased by|
|000054d0| 20 74 68 65 20 62 61 63 | 6b 2d 65 6e 64 20 61 63 | the bac|k-end ac|
|000054e0| 63 6f 72 64 69 6e 67 20 | 74 6f 20 74 68 65 69 72 |cording |to their|
|000054f0| 20 4b 49 4e 44 2e 0a 0a | 0c 0a 5c 73 65 63 74 69 | KIND...|..\secti|
|00005500| 6f 6e 7b 42 6c 6f 63 6b | 20 63 6f 6d 70 69 6c 61 |on{Block| compila|
|00005510| 74 69 6f 6e 7d 0a 0a 4f | 6e 65 20 6f 66 20 74 68 |tion}..O|ne of th|
|00005520| 65 20 70 72 6f 70 65 72 | 74 69 65 73 20 6f 66 20 |e proper|ties of |
|00005530| 49 43 52 20 69 73 20 74 | 68 61 74 20 73 75 70 70 |ICR is t|hat supp|
|00005540| 6f 72 74 73 20 22 62 6c | 6f 63 6b 20 63 6f 6d 70 |orts "bl|ock comp|
|00005550| 69 6c 61 74 69 6f 6e 22 | 20 62 79 20 61 6c 6c 6f |ilation"| by allo|
|00005560| 77 69 6e 67 0a 61 72 62 | 69 74 72 61 72 69 6c 79 |wing.arb|itrarily|
|00005570| 20 6c 61 72 67 65 20 61 | 6d 6f 75 6e 74 73 20 6f | large a|mounts o|
|00005580| 66 20 63 6f 64 65 20 74 | 6f 20 62 65 20 63 6f 6e |f code t|o be con|
|00005590| 76 65 72 74 65 64 20 61 | 74 20 6f 6e 63 65 2c 20 |verted a|t once, |
|000055a0| 77 69 74 68 20 61 63 74 | 75 61 6c 0a 63 6f 6d 70 |with act|ual.comp|
|000055b0| 69 6c 61 74 69 6f 6e 20 | 6f 66 20 74 68 65 20 63 |ilation |of the c|
|000055c0| 6f 64 65 20 62 65 69 6e | 67 20 64 6f 6e 65 20 61 |ode bein|g done a|
|000055d0| 74 20 77 69 6c 6c 2e 0a | 0a 0a 49 6e 20 6f 72 64 |t will..|..In ord|
|000055e0| 65 72 20 74 6f 20 70 72 | 65 73 65 72 76 65 20 74 |er to pr|eserve t|
|000055f0| 68 65 20 6e 6f 72 6d 61 | 6c 20 73 65 6d 61 6e 74 |he norma|l semant|
|00005600| 69 63 73 20 77 65 20 6d | 75 73 74 20 72 65 63 6f |ics we m|ust reco|
|00005610| 67 6e 69 7a 65 20 74 68 | 61 74 20 70 72 6f 63 6c |gnize th|at procl|
|00005620| 61 6d 61 74 69 6f 6e 73 | 0a 28 70 6f 73 73 69 62 |amations|.(possib|
|00005630| 6c 79 20 69 6d 70 6c 69 | 63 69 74 29 20 61 72 65 |ly impli|cit) are|
|00005640| 20 73 63 6f 70 65 64 2e | 20 20 41 20 70 72 6f 63 | scoped.| A proc|
|00005650| 6c 61 6d 61 74 69 6f 6e | 20 69 73 20 69 6e 20 65 |lamation| is in e|
|00005660| 66 66 65 63 74 20 6f 6e | 6c 79 20 66 72 6f 6d 20 |ffect on|ly from |
|00005670| 74 68 65 20 74 69 6d 65 | 0a 6f 66 20 61 70 70 65 |the time|.of appe|
|00005680| 61 72 61 6e 63 65 20 6f | 66 20 74 68 65 20 70 72 |arance o|f the pr|
|00005690| 6f 63 6c 61 6d 61 74 69 | 6f 6e 20 74 6f 20 74 68 |oclamati|on to th|
|000056a0| 65 20 74 69 6d 65 20 69 | 74 20 69 73 20 63 6f 6e |e time i|t is con|
|000056b0| 74 72 61 64 69 63 74 65 | 64 2e 20 20 54 68 65 20 |tradicte|d. The |
|000056c0| 63 75 72 72 65 6e 74 0a | 67 6c 6f 62 61 6c 20 65 |current.|global e|
|000056d0| 6e 76 69 72 6f 6e 6d 65 | 6e 74 20 61 74 20 74 68 |nvironme|nt at th|
|000056e0| 65 20 65 6e 64 20 6f 66 | 20 61 20 62 6c 6f 63 6b |e end of| a block|
|000056f0| 20 69 73 20 6e 6f 74 20 | 6e 65 63 65 73 73 61 72 | is not |necessar|
|00005700| 69 6c 79 20 74 68 65 20 | 63 6f 72 72 65 63 74 20 |ily the |correct |
|00005710| 67 6c 6f 62 61 6c 0a 65 | 6e 76 69 72 6f 6e 6d 65 |global.e|nvironme|
|00005720| 6e 74 20 66 6f 72 20 63 | 6f 6d 70 69 6c 61 74 69 |nt for c|ompilati|
|00005730| 6f 6e 20 6f 66 20 61 6c | 6c 20 74 68 65 20 63 6f |on of al|l the co|
|00005740| 64 65 20 77 69 74 68 69 | 6e 20 74 68 65 20 62 6c |de withi|n the bl|
|00005750| 6f 63 6b 2e 20 20 57 65 | 20 73 6f 6c 76 65 20 74 |ock. We| solve t|
|00005760| 68 69 73 0a 70 72 6f 62 | 6c 65 6d 20 62 79 20 63 |his.prob|lem by c|
|00005770| 6c 6f 73 69 6e 67 20 6f | 76 65 72 20 74 68 65 20 |losing o|ver the |
|00005780| 72 65 6c 65 76 61 6e 74 | 20 69 6e 66 6f 72 6d 61 |relevant| informa|
|00005790| 74 69 6f 6e 20 69 6e 20 | 74 68 65 20 49 43 52 20 |tion in |the ICR |
|000057a0| 61 74 20 74 68 65 20 74 | 69 6d 65 20 69 74 20 69 |at the t|ime it i|
|000057b0| 73 0a 63 6f 6e 76 65 72 | 74 65 64 2e 20 20 46 6f |s.conver|ted. Fo|
|000057c0| 72 20 65 78 61 6d 70 6c | 65 2c 20 65 61 63 68 20 |r exampl|e, each |
|000057d0| 66 75 6e 63 74 69 6f 6e | 61 6c 20 76 61 72 69 61 |function|al varia|
|000057e0| 62 6c 65 20 72 65 66 65 | 72 65 6e 63 65 20 69 73 |ble refe|rence is|
|000057f0| 20 6d 61 72 6b 65 64 20 | 61 73 0a 69 6e 6c 69 6e | marked |as.inlin|
|00005800| 65 2c 20 6e 6f 74 69 6e | 6c 69 6e 65 20 6f 72 20 |e, notin|line or |
|00005810| 64 6f 6e 27 74 20 63 61 | 72 65 2e 20 20 53 69 6d |don't ca|re. Sim|
|00005820| 69 6c 61 72 6c 79 2c 20 | 65 61 63 68 20 6e 6f 64 |ilarly, |each nod|
|00005830| 65 20 63 6f 6e 74 61 69 | 6e 73 20 61 20 73 74 72 |e contai|ns a str|
|00005840| 75 63 74 75 72 65 0a 6b | 6e 6f 77 6e 20 61 73 20 |ucture.k|nown as |
|00005850| 61 20 43 6f 6f 6b 69 65 | 20 77 68 69 63 68 20 63 |a Cookie| which c|
|00005860| 6f 6e 74 61 69 6e 73 20 | 74 68 65 20 61 70 70 72 |ontains |the appr|
|00005870| 6f 70 72 69 61 74 65 20 | 73 65 74 74 69 6e 67 73 |opriate |settings|
|00005880| 20 6f 66 20 74 68 65 20 | 63 6f 6d 70 69 6c 65 72 | of the |compiler|
|00005890| 0a 70 6f 6c 69 63 79 20 | 73 77 69 74 63 68 65 73 |.policy |switches|
|000058a0| 2e 0a 0a 57 65 20 61 63 | 74 75 61 6c 6c 79 20 63 |...We ac|tually c|
|000058b0| 6f 6e 76 65 72 74 20 65 | 61 63 68 20 66 6f 72 6d |onvert e|ach form|
|000058c0| 20 69 6e 20 74 68 65 20 | 66 69 6c 65 20 73 65 70 | in the |file sep|
|000058d0| 61 72 61 74 65 6c 79 2c | 20 63 72 65 61 74 69 6e |arately,| creatin|
|000058e0| 67 20 61 20 73 65 70 61 | 72 61 74 65 0a 22 69 6e |g a sepa|rate."in|
|000058f0| 69 74 69 61 6c 20 63 6f | 6d 70 6f 6e 65 6e 74 22 |itial co|mponent"|
|00005900| 20 66 6f 72 20 65 61 63 | 68 20 6f 6e 65 2e 20 20 | for eac|h one. |
|00005910| 4c 61 74 65 72 20 6f 6e | 2c 20 74 68 65 73 65 20 |Later on|, these |
|00005920| 63 6f 6d 70 6f 6e 65 6e | 74 73 20 61 72 65 20 6d |componen|ts are m|
|00005930| 65 72 67 65 64 20 61 73 | 0a 6e 65 65 64 65 64 2e |erged as|.needed.|
|00005940| 20 20 54 68 65 20 6d 61 | 69 6e 20 72 65 61 73 6f | The ma|in reaso|
|00005950| 6e 20 66 6f 72 20 64 6f | 69 6e 67 20 74 68 69 73 |n for do|ing this|
|00005960| 20 69 73 20 74 6f 20 63 | 61 75 73 65 20 45 56 41 | is to c|ause EVA|
|00005970| 4c 2d 57 48 45 4e 20 70 | 72 6f 63 65 73 73 69 6e |L-WHEN p|rocessin|
|00005980| 67 20 74 6f 20 62 65 0a | 69 6e 74 65 72 6c 65 61 |g to be.|interlea|
|00005990| 76 65 64 20 77 69 74 68 | 20 72 65 61 64 69 6e 67 |ved with| reading|
|000059a0| 2e 20 0a 0a 0c 0a 5c 73 | 65 63 74 69 6f 6e 7b 45 |. ....\s|ection{E|
|000059b0| 6e 74 72 79 20 70 6f 69 | 6e 74 73 7d 0a 0a 5c 23 |ntry poi|nts}..\#|
|000059c0| 7c 0a 0a 53 69 6e 63 65 | 20 77 65 20 6e 65 65 64 ||..Since| we need|
|000059d0| 20 74 6f 20 65 76 61 6c | 75 61 74 65 20 70 6f 74 | to eval|uate pot|
|000059e0| 65 6e 74 69 61 6c 6c 79 | 20 61 72 62 69 74 72 61 |entially| arbitra|
|000059f0| 72 79 20 63 6f 64 65 20 | 69 6e 20 74 68 65 20 58 |ry code |in the X|
|00005a00| 45 50 20 61 72 67 75 6d | 65 6e 74 20 66 6f 72 6d |EP argum|ent form|
|00005a10| 73 0a 28 66 6f 72 20 74 | 79 70 65 20 63 68 65 63 |s.(for t|ype chec|
|00005a20| 6b 69 6e 67 29 2c 20 77 | 65 20 63 61 6e 27 74 20 |king), w|e can't |
|00005a30| 6c 65 61 76 65 20 74 68 | 65 20 61 72 67 75 6d 65 |leave th|e argume|
|00005a40| 6e 74 73 20 69 6e 20 74 | 68 65 20 77 69 72 65 64 |nts in t|he wired|
|00005a50| 20 70 61 73 73 69 6e 67 | 0a 6c 6f 63 61 74 69 6f | passing|.locatio|
|00005a60| 6e 73 2e 20 20 49 6e 73 | 74 65 61 64 2c 20 69 74 |ns. Ins|tead, it|
|00005a70| 20 73 65 65 6d 73 20 62 | 65 74 74 65 72 20 74 6f | seems b|etter to|
|00005a80| 20 67 69 76 65 20 74 68 | 65 20 58 45 50 20 6d 61 | give th|e XEP ma|
|00005a90| 78 2d 61 72 67 73 20 66 | 69 78 65 64 20 61 72 67 |x-args f|ixed arg|
|00005aa0| 75 6d 65 6e 74 73 2c 0a | 77 69 74 68 20 74 68 65 |uments,.|with the|
|00005ab0| 20 70 61 73 73 69 6e 67 | 20 6c 6f 63 61 74 69 6f | passing| locatio|
|00005ac0| 6e 73 20 62 65 69 6e 67 | 20 74 68 65 20 74 72 75 |ns being| the tru|
|00005ad0| 65 20 70 61 73 73 69 6e | 67 20 6c 6f 63 61 74 69 |e passin|g locati|
|00005ae0| 6f 6e 73 2e 20 20 49 6e | 73 74 65 61 64 20 6f 66 |ons. In|stead of|
|00005af0| 20 75 73 69 6e 67 0a 25 | 58 45 50 2d 41 52 47 2c | using.%|XEP-ARG,|
|00005b00| 20 77 65 20 72 65 66 65 | 72 65 6e 63 65 20 74 68 | we refe|rence th|
|00005b10| 65 20 61 70 70 72 6f 70 | 72 69 61 74 65 20 76 61 |e approp|riate va|
|00005b20| 72 69 61 62 6c 65 2e 0a | 0a 41 6c 73 6f 2c 20 69 |riable..|.Also, i|
|00005b30| 74 20 6d 69 67 68 74 20 | 62 65 20 61 20 67 6f 6f |t might |be a goo|
|00005b40| 64 20 69 64 65 61 20 74 | 6f 20 64 6f 20 61 72 67 |d idea t|o do arg|
|00005b50| 75 6d 65 6e 74 20 63 6f | 75 6e 74 20 63 68 65 63 |ument co|unt chec|
|00005b60| 6b 69 6e 67 20 61 6e 64 | 20 64 69 73 70 61 74 63 |king and| dispatc|
|00005b70| 68 69 6e 67 0a 77 69 74 | 68 20 65 78 70 6c 69 63 |hing.wit|h explic|
|00005b80| 69 74 20 63 6f 6e 64 69 | 74 69 6f 6e 61 6c 20 63 |it condi|tional c|
|00005b90| 6f 64 65 20 69 6e 20 74 | 68 65 20 58 45 50 2e 20 |ode in t|he XEP. |
|00005ba0| 20 54 68 69 73 20 77 6f | 75 6c 64 20 73 69 6d 70 | This wo|uld simp|
|00005bb0| 6c 69 66 79 20 62 6f 74 | 68 20 74 68 65 20 63 6f |lify bot|h the co|
|00005bc0| 64 65 0a 74 68 61 74 20 | 63 72 65 61 74 65 73 20 |de.that |creates |
|00005bd0| 74 68 65 20 58 45 50 20 | 61 6e 64 20 74 68 65 20 |the XEP |and the |
|00005be0| 56 4d 52 20 63 6f 6e 76 | 65 72 73 69 6f 6e 20 6f |VMR conv|ersion o|
|00005bf0| 66 20 58 45 50 73 2e 20 | 20 41 6c 73 6f 2c 20 61 |f XEPs. | Also, a|
|00005c00| 72 67 75 6d 65 6e 74 20 | 63 6f 75 6e 74 0a 64 69 |rgument |count.di|
|00005c10| 73 70 61 74 63 68 69 6e | 67 20 77 6f 75 6c 64 20 |spatchin|g would |
|00005c20| 61 75 74 6f 6d 61 74 69 | 63 61 6c 6c 79 20 62 65 |automati|cally be|
|00005c30| 6e 65 66 69 74 20 66 72 | 6f 6d 20 61 6e 79 20 63 |nefit fr|om any c|
|00005c40| 6c 65 76 65 72 6e 65 73 | 73 20 69 6e 20 63 6f 6d |levernes|s in com|
|00005c50| 70 69 6c 61 74 69 6f 6e | 20 6f 66 0a 63 61 73 65 |pilation| of.case|
|00005c60| 2d 6c 69 6b 65 20 66 6f | 72 6d 73 20 28 6a 75 6d |-like fo|rms (jum|
|00005c70| 70 20 74 61 62 6c 65 73 | 2c 20 65 74 63 29 2e 20 |p tables|, etc). |
|00005c80| 20 4f 6e 20 74 68 65 20 | 64 6f 77 6e 73 69 64 65 | On the |downside|
|00005c90| 2c 20 74 68 69 73 20 77 | 6f 75 6c 64 20 70 75 73 |, this w|ould pus|
|00005ca0| 68 20 73 6f 6d 65 0a 61 | 73 73 75 6d 70 74 69 6f |h some.a|ssumptio|
|00005cb0| 6e 73 20 61 62 6f 75 74 | 20 68 6f 77 20 61 72 67 |ns about| how arg|
|00005cc0| 20 64 69 73 70 61 74 63 | 68 69 6e 67 20 69 73 20 | dispatc|hing is |
|00005cd0| 64 6f 6e 65 20 69 6e 74 | 6f 20 49 43 52 2e 20 20 |done int|o ICR. |
|00005ce0| 42 75 74 20 74 68 65 6e | 20 77 65 20 61 72 65 0a |But then| we are.|
|00005cf0| 63 75 72 72 65 6e 74 6c | 79 20 76 69 6f 6c 61 74 |currentl|y violat|
|00005d00| 69 6e 67 20 61 62 73 74 | 72 61 63 74 69 6f 6e 20 |ing abst|raction |
|00005d10| 61 74 20 6c 65 61 73 74 | 20 61 73 20 62 61 64 6c |at least| as badl|
|00005d20| 79 20 69 6e 20 56 4d 52 | 20 63 6f 6e 76 65 72 73 |y in VMR| convers|
|00005d30| 69 6f 6e 2c 20 77 68 69 | 63 68 20 69 73 0a 61 6c |ion, whi|ch is.al|
|00005d40| 73 6f 20 73 75 70 70 6f | 73 65 64 20 74 6f 20 62 |so suppo|sed to b|
|00005d50| 65 20 69 6d 70 6c 65 6d | 65 6e 74 61 74 69 6f 6e |e implem|entation|
|00005d60| 20 69 6e 64 65 70 65 6e | 64 65 6e 74 2e 0a 7c 5c | indepen|dent..|\|
|00005d70| 23 0a 0a 41 73 20 61 20 | 73 69 64 65 2d 65 66 66 |#..As a |side-eff|
|00005d80| 65 63 74 20 6f 66 20 66 | 69 6e 64 69 6e 67 20 77 |ect of f|inding w|
|00005d90| 68 69 63 68 20 72 65 66 | 65 72 65 6e 63 65 73 20 |hich ref|erences |
|00005da0| 74 6f 20 6b 6e 6f 77 6e | 20 66 75 6e 63 74 69 6f |to known| functio|
|00005db0| 6e 73 20 63 61 6e 20 62 | 65 0a 63 6f 6e 76 65 72 |ns can b|e.conver|
|00005dc0| 74 65 64 20 74 6f 20 6c | 6f 63 61 6c 20 63 61 6c |ted to l|ocal cal|
|00005dd0| 6c 73 2c 20 77 65 20 66 | 69 6e 64 20 61 6e 79 20 |ls, we f|ind any |
|00005de0| 72 65 66 65 72 65 6e 63 | 65 73 20 74 68 61 74 20 |referenc|es that |
|00005df0| 63 61 6e 6e 6f 74 20 62 | 65 20 63 6f 6e 76 65 72 |cannot b|e conver|
|00005e00| 74 65 64 2e 0a 52 65 66 | 65 72 65 6e 63 65 73 20 |ted..Ref|erences |
|00005e10| 74 68 61 74 20 63 61 6e | 6e 6f 74 20 62 65 20 63 |that can|not be c|
|00005e20| 6f 6e 76 65 72 74 65 64 | 20 74 6f 20 61 20 6c 6f |onverted| to a lo|
|00005e30| 63 61 6c 20 63 61 6c 6c | 20 6d 75 73 74 20 65 76 |cal call| must ev|
|00005e40| 61 6c 75 61 74 65 20 74 | 6f 20 61 0a 22 66 75 6e |aluate t|o a."fun|
|00005e50| 63 74 69 6f 6e 20 6f 62 | 6a 65 63 74 22 20 28 6f |ction ob|ject" (o|
|00005e60| 72 20 66 75 6e 63 74 69 | 6f 6e 2d 65 6e 74 72 79 |r functi|on-entry|
|00005e70| 29 20 74 68 61 74 20 63 | 61 6e 20 62 65 20 63 61 |) that c|an be ca|
|00005e80| 6c 6c 65 64 20 75 73 69 | 6e 67 20 74 68 65 20 66 |lled usi|ng the f|
|00005e90| 75 6c 6c 20 63 61 6c 6c | 0a 63 6f 6e 76 65 6e 74 |ull call|.convent|
|00005ea0| 69 6f 6e 2e 20 20 41 20 | 66 75 6e 63 74 69 6f 6e |ion. A |function|
|00005eb0| 20 74 68 61 74 20 63 61 | 6e 20 62 65 20 63 61 6c | that ca|n be cal|
|00005ec0| 6c 65 64 20 66 72 6f 6d | 20 6f 75 74 73 69 64 65 |led from| outside|
|00005ed0| 20 74 68 65 20 63 6f 6d | 70 6f 6e 65 6e 74 20 69 | the com|ponent i|
|00005ee0| 73 20 63 61 6c 6c 65 64 | 0a 61 6e 20 22 65 6e 74 |s called|.an "ent|
|00005ef0| 72 79 2d 70 6f 69 6e 74 | 22 2e 0a 0a 4c 6f 74 73 |ry-point|"...Lots|
|00005f00| 20 6f 66 20 73 74 75 66 | 66 20 74 68 61 74 20 68 | of stuf|f that h|
|00005f10| 61 70 70 65 6e 73 20 61 | 74 20 63 6f 6d 70 69 6c |appens a|t compil|
|00005f20| 65 2d 74 69 6d 65 20 77 | 69 74 68 20 6c 6f 63 61 |e-time w|ith loca|
|00005f30| 6c 20 66 75 6e 63 74 69 | 6f 6e 20 63 61 6c 6c 73 |l functi|on calls|
|00005f40| 20 6d 75 73 74 20 62 65 | 0a 64 6f 6e 65 20 61 74 | must be|.done at|
|00005f50| 20 72 75 6e 2d 74 69 6d | 65 20 77 68 65 6e 20 61 | run-tim|e when a|
|00005f60| 6e 20 65 6e 74 72 79 2d | 70 6f 69 6e 74 20 69 73 |n entry-|point is|
|00005f70| 20 63 61 6c 6c 65 64 2e | 0a 0a 49 74 20 69 73 20 | called.|..It is |
|00005f80| 64 65 73 69 72 61 62 6c | 65 20 66 6f 72 20 6f 70 |desirabl|e for op|
|00005f90| 74 69 6d 69 7a 61 74 69 | 6f 6e 20 61 6e 64 20 6f |timizati|on and o|
|00005fa0| 74 68 65 72 20 70 75 72 | 70 6f 73 65 73 20 69 66 |ther pur|poses if|
|00005fb0| 20 61 6c 6c 20 74 68 65 | 20 63 61 6c 6c 73 20 74 | all the| calls t|
|00005fc0| 6f 20 65 76 65 72 79 0a | 66 75 6e 63 74 69 6f 6e |o every.|function|
|00005fd0| 20 77 65 72 65 20 64 69 | 72 65 63 74 6c 79 20 70 | were di|rectly p|
|00005fe0| 72 65 73 65 6e 74 20 69 | 6e 20 49 43 52 20 61 73 |resent i|n ICR as|
|00005ff0| 20 6c 6f 63 61 6c 20 63 | 61 6c 6c 73 2e 20 20 57 | local c|alls. W|
|00006000| 65 20 63 61 6e 6e 6f 74 | 20 64 69 72 65 63 74 6c |e cannot| directl|
|00006010| 79 20 64 6f 0a 74 68 69 | 73 20 77 69 74 68 20 65 |y do.thi|s with e|
|00006020| 6e 74 72 79 2d 70 6f 69 | 6e 74 20 66 75 6e 63 74 |ntry-poi|nt funct|
|00006030| 69 6f 6e 73 2c 20 73 69 | 6e 63 65 20 77 65 20 64 |ions, si|nce we d|
|00006040| 6f 6e 27 74 20 6b 6e 6f | 77 20 77 68 65 72 65 20 |on't kno|w where |
|00006050| 61 6e 64 20 68 6f 77 20 | 74 68 65 0a 65 6e 74 72 |and how |the.entr|
|00006060| 79 2d 70 6f 69 6e 74 20 | 77 69 6c 6c 20 62 65 20 |y-point |will be |
|00006070| 63 61 6c 6c 65 64 20 75 | 6e 74 69 6c 20 72 75 6e |called u|ntil run|
|00006080| 2d 74 69 6d 65 2e 0a 0a | 57 68 61 74 20 77 65 20 |-time...|What we |
|00006090| 64 6f 20 69 73 20 72 65 | 70 72 65 73 65 6e 74 20 |do is re|present |
|000060a0| 61 6c 6c 20 74 68 65 20 | 63 61 6c 6c 73 20 70 6f |all the |calls po|
|000060b0| 73 73 69 62 6c 65 20 66 | 72 6f 6d 20 6f 75 74 73 |ssible f|rom outs|
|000060c0| 69 64 65 20 74 68 65 20 | 63 6f 6d 70 6f 6e 65 6e |ide the |componen|
|000060d0| 74 20 62 79 0a 6c 6f 63 | 61 6c 20 63 61 6c 6c 73 |t by.loc|al calls|
|000060e0| 20 77 69 74 68 69 6e 20 | 74 68 65 20 63 6f 6d 70 | within |the comp|
|000060f0| 6f 6e 65 6e 74 2e 20 20 | 46 6f 72 20 65 61 63 68 |onent. |For each|
|00006100| 20 65 6e 74 72 79 2d 70 | 6f 69 6e 74 20 66 75 6e | entry-p|oint fun|
|00006110| 63 74 69 6f 6e 2c 20 77 | 65 20 63 72 65 61 74 65 |ction, w|e create|
|00006120| 20 61 0a 63 6f 72 72 65 | 73 70 6f 6e 64 69 6e 67 | a.corre|sponding|
|00006130| 20 6c 61 6d 62 64 61 20 | 63 61 6c 6c 65 64 20 74 | lambda |called t|
|00006140| 68 65 20 65 78 74 65 72 | 6e 61 6c 20 65 6e 74 72 |he exter|nal entr|
|00006150| 79 20 70 6f 69 6e 74 20 | 6f 72 20 58 45 50 2e 20 |y point |or XEP. |
|00006160| 20 54 68 69 73 20 69 73 | 20 61 0a 66 75 6e 63 74 | This is| a.funct|
|00006170| 69 6f 6e 20 77 68 69 63 | 68 20 74 61 6b 65 73 20 |ion whic|h takes |
|00006180| 74 68 65 20 6e 75 6d 62 | 65 72 20 6f 66 20 61 72 |the numb|er of ar|
|00006190| 67 75 6d 65 6e 74 73 20 | 70 61 73 73 65 64 20 61 |guments |passed a|
|000061a0| 73 20 74 68 65 20 66 69 | 72 73 74 20 61 72 67 75 |s the fi|rst argu|
|000061b0| 6d 65 6e 74 2c 0a 66 6f | 6c 6c 6f 77 65 64 20 62 |ment,.fo|llowed b|
|000061c0| 79 20 61 72 67 75 6d 65 | 6e 74 73 20 63 6f 72 72 |y argume|nts corr|
|000061d0| 65 73 70 6f 6e 64 69 6e | 67 20 74 6f 20 65 61 63 |espondin|g to eac|
|000061e0| 68 20 72 65 71 75 69 72 | 65 64 20 6f 72 20 6f 70 |h requir|ed or op|
|000061f0| 74 69 6f 6e 61 6c 20 61 | 72 67 75 6d 65 6e 74 2e |tional a|rgument.|
|00006200| 0a 0a 49 66 20 61 6e 20 | 6f 70 74 69 6f 6e 61 6c |..If an |optional|
|00006210| 20 61 72 67 75 6d 65 6e | 74 20 69 73 20 75 6e 73 | argumen|t is uns|
|00006220| 75 70 70 6c 69 65 64 2c | 20 74 68 65 20 76 61 6c |upplied,| the val|
|00006230| 75 65 20 70 61 73 73 65 | 64 20 69 6e 74 6f 20 74 |ue passe|d into t|
|00006240| 68 65 20 58 45 50 20 69 | 73 0a 75 6e 64 65 66 69 |he XEP i|s.undefi|
|00006250| 6e 65 64 2e 20 20 54 68 | 65 20 58 45 50 20 69 73 |ned. Th|e XEP is|
|00006260| 20 72 65 73 70 6f 6e 73 | 69 62 6c 65 20 66 6f 72 | respons|ible for|
|00006270| 20 64 6f 69 6e 67 20 61 | 72 67 75 6d 65 6e 74 20 | doing a|rgument |
|00006280| 63 6f 75 6e 74 20 63 68 | 65 63 6b 69 6e 67 20 61 |count ch|ecking a|
|00006290| 6e 64 0a 64 69 73 70 61 | 74 63 68 69 6e 67 2e 20 |nd.dispa|tching. |
|000062a0| 20 0a 0a 49 6e 20 74 68 | 65 20 63 61 73 65 20 6f | ..In th|e case o|
|000062b0| 66 20 61 20 66 69 78 65 | 64 2d 61 72 67 20 6c 61 |f a fixe|d-arg la|
|000062c0| 6d 62 64 61 2c 20 77 65 | 20 65 6d 69 74 20 61 20 |mbda, we| emit a |
|000062d0| 63 61 6c 6c 20 74 6f 20 | 74 68 65 20 25 56 45 52 |call to |the %VER|
|000062e0| 49 46 59 2d 41 52 47 55 | 4d 45 4e 54 2d 43 4f 55 |IFY-ARGU|MENT-COU|
|000062f0| 4e 54 0a 66 75 6e 6e 79 | 20 66 75 6e 63 74 69 6f |NT.funny| functio|
|00006300| 6e 20 28 63 6f 6e 64 69 | 74 69 6f 6e 61 6c 20 6f |n (condi|tional o|
|00006310| 6e 20 70 6f 6c 69 63 79 | 29 2c 20 74 68 65 6e 20 |n policy|), then |
|00006320| 63 61 6c 6c 20 74 68 65 | 20 72 65 61 6c 20 66 75 |call the| real fu|
|00006330| 6e 63 74 69 6f 6e 20 6f | 6e 20 74 68 65 0a 70 61 |nction o|n the.pa|
|00006340| 73 73 65 64 20 61 72 67 | 75 6d 65 6e 74 73 2e 20 |ssed arg|uments. |
|00006350| 20 45 76 65 6e 20 69 6e | 20 74 68 69 73 20 73 69 | Even in| this si|
|00006360| 6d 70 6c 65 20 63 61 73 | 65 2c 20 77 65 20 62 65 |mple cas|e, we be|
|00006370| 6e 65 66 69 74 20 73 65 | 76 65 72 61 6c 20 77 61 |nefit se|veral wa|
|00006380| 79 73 20 66 72 6f 6d 0a | 68 61 76 69 6e 67 20 61 |ys from.|having a|
|00006390| 20 73 65 70 61 72 61 74 | 65 20 58 45 50 3a 0a 20 | separat|e XEP:. |
|000063a0| 2d 2d 20 54 68 65 20 61 | 72 67 75 6d 65 6e 74 20 |-- The a|rgument |
|000063b0| 63 6f 75 6e 74 20 63 68 | 65 63 6b 69 6e 67 20 69 |count ch|ecking i|
|000063c0| 73 20 66 61 63 74 6f 72 | 65 64 20 6f 75 74 2c 20 |s factor|ed out, |
|000063d0| 61 6e 64 20 6f 6e 6c 79 | 20 6e 65 65 64 73 20 74 |and only| needs t|
|000063e0| 6f 20 62 65 20 64 6f 6e | 65 20 69 6e 0a 20 20 20 |o be don|e in. |
|000063f0| 20 66 75 6c 6c 20 63 61 | 6c 6c 73 2e 0a 20 2d 2d | full ca|lls.. --|
+--------+-------------------------+-------------------------+--------+--------+
Only 25.0 KB of data is shown above.